Description of problem: If you run a script that does a "wait" without a doing a "close" before hand, expect will segfault. Version-Release number of selected component (if applicable): 5.38.0-88 How reproducible: Always Steps to Reproduce: 1. Run the following script: spawn /bin/ls wait Actual results: You get a segmentation fault. If you run gdb against expect and the core you get the following backtrace: #0 0x4002d2e1 in expStateCheck (interp=0xbfffe9f0, esPtr=0xb8, open=1, adjust=0, msg=0xbfffe9f0 "close") at exp_command.c:200 200 exp_command.c: No such file or directory. in exp_command.c (gdb) bt #0 0x4002d2e1 in expStateCheck (interp=0xbfffe9f0, esPtr=0xb8, open=1, adjust=0, msg=0xbfffe9f0 "close") at exp_command.c:200 #1 0x4002d5b0 in exp_close (interp=0x804a328, esPtr=0xb8) at exp_command.c:326 #2 0x40042bac in exp_close_all (interp=0x804a328) at exp_chan.c:403 #3 0x4003b4b8 in exp_exit_handlers (clientData=0x804a328) at exp_main_sub.c:143 #4 0x400877ff in Tcl_Finalize () from /usr/lib/libtcl8.3.so #5 0x400875fb in Tcl_Exit () from /usr/lib/libtcl8.3.so #6 0x40030399 in Exp_ExitCmd (clientData=0x0, interp=0x4004e3fc, argc=2, argv=0xbfffeaf4) at exp_command.c:2261 #7 0x4006b78b in TclInvokeStringCommand () from /usr/lib/libtcl8.3.so #8 0x400a7517 in TclExpandTokenArray () from /usr/lib/libtcl8.3.so #9 0x400a7c02 in Tcl_EvalEx () from /usr/lib/libtcl8.3.so #10 0x400a7f66 in Tcl_Eval () from /usr/lib/libtcl8.3.so #11 0x08048a81 in main () #12 0x420156a4 in __libc_start_main () from /lib/tls/libc.so.6 Expected results: No segfault, please. Additional info: If you add a close before the wait, the segfault goes away.
Thanks for the report. It would certain be nice to have a fix for this. *** This bug has been marked as a duplicate of 58317 ***
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.