Artifacts Associated With Ticket 735335ffffffffffffffffffffffffffffffffff
Ticket change [e5a230ef3d] (rid 104154) by dgp on 2003-05-09 17:19:21:
- assignee initialized to: "msofer"
- cmimetype initialized to: "text/plain"
- comment initialized to:
This script segfaults in Tcl 8.4.0 and later: proc A { name } { upvar $name var set var [list $name] } proc foo {script} { uplevel 1 $script } namespace eval test { foo {A name} unset name } Looks like something wrong with the new "varName" Tcl_ObjType. Key elements: upvar through an uplevel to a namespace eval context; potential shimmering/sharing of the $name value. - foundin initialized to: "obsolete: 8.4.2"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "07. Variables"
- title initialized to: "segfault in [unset]"
- type initialized to: "Bug"
Ticket change [c0da5f966c] (rid 102484) by dgp on 2003-05-10 00:24:04:
- icomment:
Logged In: YES user_id=80530 even simpler: proc A { name } { upvar $name var set var $name } proc foo {script} { uplevel 1 $script } namespace eval test { foo {A name} unset name } - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [d7d57405fe] (rid 107333) by msofer on 2003-05-10 09:26:25:
- icomment:
Logged In: YES user_id=148712 even simpler (look ma, no uplevel!): proc A { name } { upvar $name var set var $name } namespace eval test A x namespace eval test unset x Interestingly, no segfault if the last line is replaced with unset test::x - login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [23eca77094] (rid 131021) by msofer on 2003-05-13 00:21:50:
- icomment:
Logged In: YES user_id=148712 Committed temporary fix by disabling usage of tclNsVarNameType, pending better understanding of the issue.
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [d5ed628fa1] (rid 123720) by msofer on 2003-05-13 05:48:17:
- icomment:
Logged In: YES user_id=148712 This temp fix also fixed a previously undetected bug in 8.4: [mig@mini unix]$ tclsh % set x 1 1 % unset x % namespace eval test set x 0 0 % set x 0 After the temp fix, the result is as it should be: can't read "x": no such variable
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [1dc29cc87e] (rid 90868) by msofer on 2004-03-28 03:22:50:
- icomment:
Logged In: YES user_id=148712 Mmhhh ... the bug does not appear in a --enable-symbols=all build :(
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [e62e212f8e] (rid 104255) by msofer on 2004-03-28 04:39:09:
- icomment:
Logged In: YES user_id=148712 It is TCL_MEM_DEBUG that shuts the bug off
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [526a5da67c] (rid 126312) by msofer on 2004-03-28 07:27:40:
- icomment:
Logged In: YES user_id=148712 Some more puzzling data: I see no segfault now, but a panic: "malformed bucket chain in Tcl_DeleteHashEntry" - even under -DPURIFY. It may be some kind of double-free of the variable structure?
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [ff4c905564] (rid 108732) by msofer on 2004-05-22 10:47:32:
- closedate changed to: "2004-05-22T03:47:32"
- closer changed to: "msofer"
- icomment:
Logged In: YES user_id=148712 Bug is now fixed. It was caused by insufficient protection during unset, in the case where the varName and varValue were a same Tcl_Obj of tclNsVarNameType. Resolution (simplified, see TclObjUnsetVar2 for the real thing): varPtr->refCount++; /* NEW */ Tcl_DecrRefCount(varPtr->valuePtr); varPtr->refCount--; /* NEW */
- login: "msofer"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "msofer"