Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#90 expect seg fault when using long -f argument along -d option

open
nobody
None
5
2012-06-15
2012-06-15
swamy
No

expect will core dump if we use long file name to -f along with -d option, if -d option is not specified no seg faults happens.

here is reproduce steps

$ a=0; STRNG=A
$ while [[ $a -lt 14 ]]; do
> let a=$a+1
> STRNG=$STRNG$STRNG
> done
$

$ expect -f $STRNG -d
expect version 5.44.1.14
argv[0] = expect argv[1] = -f argv[2] = AAAAAAAAAAAAAAAAAAAAAAAAAAAAA <cont ........> argv[3] = -d
set argc 0
Segmentation fault
$ expect -f $STRNG
couldn't read file "AAAAAAAAAAAAAAAAAAAAA <cont .....>": file name too long
$

environment details

% puts $tcl_version
8.4
% info patchlevel
8.4.19

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.4 LTS
Release: 10.04
Codename: lucid

$ uname -m
i686

Discussion

  • swamy
    swamy
    2012-08-31

    someone please have a look if it seems to be valid issue.