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
someone please have a look if it seems to be valid issue.