Artifacts Associated With Ticket 3530230fffffffff
Ticket change [2277063a47] (rid 130755) by dkf on 2012-05-28 13:23:59:
- assignee initialized to: "dgp"
- cmimetype initialized to: "text/plain"
- comment initialized to:
I was trying to ensure that [return -level 2] works inside a sourced script in a safe interpreter (created with safe::interpCreate so using some aliases, including for [source]) and I found that the test below caused a crash. The crash doesn't appear to be related to the implementation of the aliased version of [source]; I tried several and got a crash every time. test safe-8.10 {safe source and return} -setup { set returnScript [makeFile {return -level 2 "ok"} return.tcl] catch {safe::interpDelete $i} } -body { safe::interpCreate $i set token [safe::interpAddToAccessPath $i [file dirname $returnScript]] $i eval [list apply {filename { source $filename error boom }} $token/[file tail $returnScript]] } -cleanup { catch {safe::interpDelete $i} removeFile $returnScript } -result ok I'm not 100% sure that the test is right, but I'm sure it shouldn't crash… - foundin initialized to: "obsolete: 8.6b2"
- is_private initialized to: "0"
- priority initialized to: "8"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dkf"
- subsystem initialized to: "45. Parsing and Eval"
- title initialized to: "multi-level return from source in safe interps"
- type initialized to: "Bug"
Ticket change [5ac090d921] (rid 118200) by dgp on 2012-06-06 00:36:12:
- icomment:
No crash when the test is run alone. Crash is seen when combined with other tests, and only after the test is complete. When the test is run alone, it errors. ==== safe-8.10 safe source and return FAILED ==== Contents of test case: safe::interpCreate $i set token [safe::interpAddToAccessPath $i [file dirname $returnScript]] $i eval [list apply {filename { source $filename error boom }} $token/[file tail $returnScript]] ---- Test generated error; Return code was: 1 ---- Return code should have been one of: 0 2 ---- errorInfo: can't read "i": no such variable while executing "safe::interpCreate $i" ("uplevel" body line 2) invoked from within "uplevel 1 $script" ---- errorCode: TCL LOOKUP VARNAME i ==== safe-8.10 FAILED When run with some other safe-8* tests, it passes. - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [54cad4ada2] (rid 94011) by dgp on 2012-06-06 00:43:21:
- foundin changed to: "obsolete: 8.5.11"
- icomment:
Same symptoms on tip of core-8-5-branch. Seeking a fix there first.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
Ticket change [3b190c6dd4] (rid 112667) by dgp on 2012-06-06 00:48:48:
- icomment:
Program received signal SIGSEGV, Segmentation fault. 0x00000000004e8dc2 in TclProcCleanupProc (procPtr=0x93d330) at /home/dgp/fossil/tcl8.5/unix/../generic/tclProc.c:2205 2205 hePtr = Tcl_FindHashEntry(iPtr->linePBodyPtr, (char *) procPtr); (gdb) bt #0 0x00000000004e8dc2 in TclProcCleanupProc (procPtr=0x93d330) at /home/dgp/fossil/tcl8.5/unix/../generic/tclProc.c:2205 #1 0x00000000004e90f2 in FreeLambdaInternalRep (objPtr=0x98f9c0) at /home/dgp/fossil/tcl8.5/unix/../generic/tclProc.c:2436 #2 0x00000000004d3e41 in TclFreeObj (objPtr=0x9720a0) at /home/dgp/fossil/tcl8.5/unix/../generic/tclObj.c:1439 - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [538719c0f5] (rid 93775) by dgp on 2012-06-06 01:16:25:
- icomment:
At this point iPtr->linePBodyPtr is NULL, so the Tcl_FindHashEntry() macro crashes.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [e067a2c067] (rid 115188) by andreas_kupries on 2012-06-06 01:19:25:
- icomment:
That field for #280 support, associated proc bodies with line information. It is keyed by proc body pointers. However here the whole hashtable seems to not be initialized at all ?! An issue with safe interps ?
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [a0e1544ee7] (rid 96885) by dgp on 2012-06-06 02:31:39:
- icomment:
Trouble is rooted in a Lambda that manages to survive the death of its interp.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [1281346df3] (rid 95314) by dgp on 2012-06-06 03:19:17:
- icomment:
There's nothing in place to assure that procPtr->iPtr doesn't hold a (Tcl_Interp *) that's already been freed. Either something has to go in place to do that (don't think that's right), or all code that pulls a value from procPtr->iPtr has to be able to tolerate that value being an invalid pointer. Hmmmm....
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [9ab885437d] (rid 111003) by dgp on 2012-06-08 03:28:44:
- closedate changed to: "2012-06-07T20:28:44"
- closer changed to: "dgp"
- icomment:
allow_comments - 1 Simple demo of the crash problem opened as ticket 3532959
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Duplicate"
- status changed to: "Closed"
- username: "dgp"
Ticket change [433104b2aa] (rid 116508) by andreas_kupries on 2012-06-12 03:22:04:
- icomment:
Can this ticket be closed, now that ticket 3532959 is fixed?
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [6b9735b61d] (rid 128353) by andreas_kupries on 2012-06-12 03:22:05:
- icomment:
allow_comments - 0
- login: "andreas_kupries"
- mimetype: "text/plain"
- resolution changed to: "None"
- status changed to: "Open"
- username: "andreas_kupries"
- icomment:
Ticket change [85ef6c3d24] (rid 131410) by andreas_kupries on 2012-06-12 03:38:06:
- closedate changed to: "2012-06-11T20:38:06"
- closer changed to: "andreas_kupries"
- icomment:
allow_comments - 1 Sorry, I had the bug open and missed that it is closed already.
- login: "andreas_kupries"
- mimetype: "text/plain"
- resolution changed to: "Duplicate"
- status changed to: "Closed"
- username: "andreas_kupries"