Skip to content
Tcl Source Code View Ticket
Login

View Ticket

crash on interp delete

Closed / Fixed1937135fffffffffffffffffffffffffffffffffCreated 19 years agoUpdated 19 years ago
Descriptionplain2008-04-07 22:33:15
Trying to make a test for Tk bug 1936238, I hit this issue (8.5 head build with --enable-symbols=all):

% set i [interp create]
interp0
% $i eval { set argc 1 ; set argv -help }
-help
% load {} Tk $i
Command-specific options:
 -colormap: Colormap for main window
 -display:  Display to use
 -geometry: Initial geometry for window
 -name:     Name to use for application
 -sync:     Use synchronous mode for display server
 -visual:   Visual for main window
 -use:      Id of window in which to embed application
 --:        Pass all remaining arguments through to script
% interp delete $i
low guard byte 0 is 0x0
low guard byte 1 is 0x0
low guard byte 2 is 0x0
low guard byte 3 is 0x0
low guard byte 4 is 0x0
low guard byte 5 is 0x0
low guard byte 6 is 0x0
low guard byte 7 is 0x0
low guard byte 8 is 0x0
low guard byte 9 is 0x0
low guard byte 10 is 0x0
low guard byte 11 is 0x0
total mallocs                  55672
total frees                    38606
current packets allocated      17066
current bytes allocated      1186474
maximum packets allocated      17384
maximum bytes allocated      1233060
low guard failed at b4f738, /home/jeffh/cvs/tcl/tcl8.5/generic/tclObj.c 852
12 bytes allocated at (/home/jeffh/cvs/tcl/tcl8.5/generic/tclListObj.c 1820)
Memory validation failure

another run pointed to the obj holding ::errorCode of list type with byte == "NONE".  It may be mem corruption, but I suspect something in Tcl shutdown that the error in Tk is just exposing.  There was a similar problem I found recently with loading vfs not completely correctly would also cause a seg fault with "alloc ..." failure warning.

Perhaps it is actually in loading?  Too early to say at this point.
hobbsplain2008-04-08 06:13:44
Logged In: YES 
user_id=72656
Originator: YES

The error here was actually that Tk_ParseArgv was double-free'ing argv (once on error, then in the argError/done goto).  Fixed for 8.4.19, 8.5.3 and 8.6a1.
Log in (anonymous is fine) to add a comment.