Artifacts Associated With Ticket 3081065
Ticket change [32da69bd6c] (rid 93690) by dgp on 2010-10-04 18:25:22:
- assignee initialized to: "patthoyts"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Tcl HEAD: $ make test TESTFLAGS='-singleproc 1 -file "http.test httpold.test"' ... http.test Running httpd in thread 1080544144 httpold.test Running http 1.0 tests in slave interp httpold.test: Total 31 Passed 31 Skipped 0 Failed 0 make: *** [test-tcl] Segmentation fault segfault after [tcltest::cleanupTests] returns.
- foundin initialized to: "obsolete: 8.6b1.1"
- is_private initialized to: "0"
- priority initialized to: "9 Immediate"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "29. http Package"
- title initialized to: "segfault in httpold.test"
- type initialized to: "Bug"
Ticket change [bb009580b7] (rid 129407) by dgp on 2010-10-05 01:33:27:
- icomment:
Narrowing it down, same segfault from: make test TESTFLAGS='-singleproc 1 -file "http.test httpold.test" -match httpold-5.1' so only one test is run.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [24b3109125] (rid 131152) by msofer on 2010-10-05 02:35:09:
- icomment:
no repro here, and valgrind looks happy enough
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [5abdd5dba6] (rid 118197) by kennykb on 2010-10-05 03:41:24:
- icomment:
Stack trace: ==24462== Invalid read of size 4 ==24462== at 0x4137C32: MoveObjs (tclThreadAlloc.c:719) ==24462== by 0x413794F: TclThreadFreeObj (tclThreadAlloc.c:630) ==24462== by 0x4115C3E: TclFreeObj (tclObj.c:1447) ==24462== by 0x414AA06: DeleteArray (tclVar.c:5430) ==24462== by 0x414649E: UnsetVarStruct (tclVar.c:2532) ==24462== by 0x414A69F: TclDeleteNamespaceVars (tclVar.c:5253) ==24462== by 0x410F89E: TclTeardownNamespace (tclNamesp.c:1053) ==24462== by 0x4052B0B: DeleteInterpProc (tclBasic.c:1419) ==24462== by 0x4125AF8: Tcl_EventuallyFree (tclPreserve.c:299) ==24462== by 0x4052944: Tcl_DeleteInterp (tclBasic.c:1308) ==24462== by 0x40E8DEE: SlaveObjCmdDeleteProc (tclInterp.c:2587) ==24462== by 0x4054A41: Tcl_DeleteCommandFromToken (tclBasic.c:3021) ==24462== Address 0x10 is not stack'd, malloc'd or (recently) free'd
- login: "kennykb"
- mimetype: "text/plain"
- username: "kennykb"
- icomment:
Ticket change [8e8b9d14da] (rid 120124) by dgp on 2010-10-05 20:19:47:
- icomment:
Attached is a demo script. The crash is in MoveObjs in the thread-enabled allocator. The chain of Tcl_Obj's is corrupted with a NULL value where a link in the chain ought to be. Suspect the real cause must be something continuing to write NULLs to an intrep after the Tcl_Obj has been freed. The <substcode> Tcl_ObjType is a likely suspect, but not yet confirmed.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [2571958c89] (rid 88172) by dgp on 2010-10-05 20:19:48:
- assignee changed to: "msofer"
- subsystem changed to: "41. Memory Allocation"
Ticket change [5790fa7c06] (rid 94507) by dgp on 2010-10-05 20:20:30:
- icomment:
File Added - 388895: demo.tcl
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Add attachment "demo.tcl" [595cf44445] (rid 117967) by dgp on 2010-10-05 20:20:30.
Ticket change [c3efec60d2] (rid 111760) by dgp on 2010-10-05 23:03:29:
- title changed to: "post-free writes to Tcl_Obj fields"
Ticket change [65f06fbbc5] (rid 102630) by dgp on 2010-10-05 23:03:58:
- assignee changed to: "dgp"
- subsystem changed to: "47. Bytecode Compiler"
Ticket change [1a87cc709c] (rid 122993) by dgp on 2010-10-05 23:30:13:
- icomment:
When calling TclCleanupByteCode() to free the internal rep of a Tcl_Obj, it is possible to reduce the refcount on that same Tcl_Obj to zero, causing it to be freed. This means a freeIntRepProc ought not be writing to the objPtr->fields after TCBC returns.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [f0227c3a50] (rid 109133) by dgp on 2010-10-07 01:23:01:
- icomment:
File Added - 389085: 3081065.patch
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Add attachment "3081065.patch" [83d9911f0b] (rid 117443) by dgp on 2010-10-07 01:23:01.
Ticket change [8e0008325f] (rid 128038) by dgp on 2010-10-07 01:24:19:
- icomment:
Attached is a fix with test.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [d30ea9e5ff] (rid 113627) by dgp on 2010-10-07 01:39:12:
- closedate changed to: "2010-10-06T18:39:12"
- closer changed to: "dgp"
- icomment:
allow_comments - 1 Committed.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dgp"
Ticket change [b0167622c0] (rid 97922) by nijtmans on 2010-10-07 04:05:00:
- icomment:
Two minor observations: - If this can happen in FreeSubstCodeInternalRep, then it can happen in FreeByteCodeInternalRep as well. - After modifying FreeByteCodeInternalRep, it's implementation is equal to FreeSubstCodeInternalRep, so one of them could be eliminated. I don't know if a test case can be found for this, but better safe than sorry. Here is a patch. The FreeByteCodeInternalRep change should be backported to 8.5 and 8.4 as well IMHO.
- login: "nijtmans"
- mimetype: "text/plain"
- username: "nijtmans"
- icomment:
Ticket change [7efd6d14c0] (rid 97499) by nijtmans on 2010-10-07 04:05:01:
- icomment:
allow_comments - 0
- login: "nijtmans"
- mimetype: "text/plain"
- status changed to: "Open"
- username: "nijtmans"
- icomment:
Add attachment "tclCompile.patch" [a9bed8765e] (rid 99203) by nijtmans on 2010-10-07 04:06:53.
Ticket change [f023c6f29a] (rid 109135) by nijtmans on 2010-10-07 04:06:53:
- icomment:
File Added - 389100: tclCompile.patch
- login: "nijtmans"
- mimetype: "text/plain"
- username: "nijtmans"
- icomment:
Ticket change [22605914c0] (rid 130737) by dgp on 2010-10-07 10:06:29:
- icomment:
Good observation. Miguel and I are already pursuing that as a separate issue. See 467523 and http://paste.tclers.tk/2216 FreeExprCodeInternalRep is the other which matches the pattern, and I'll be changing it as well, though current other choices in expr compilation are such that an analogous bug "can't happen".
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [22607b3257] (rid 130738) by dgp on 2010-10-07 10:06:31:
- closedate changed to: "2010-10-07T03:06:31"
- closer changed to: "dgp"
- icomment:
allow_comments - 1
- login: "dgp"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "dgp"