Skip to content
Tcl Source Code History Of Ticket 735335ffffffffff
Login

History Of Ticket 735335ffffffffff

Artifacts Associated With Ticket 735335ffffffffff

  1. Ticket change [e5a230ef3d] (rid 104154) by dgp on 2003-05-09 17:19:21:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. 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.
      
      
    4. foundin initialized to: "obsolete: 8.4.2"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "dgp"
    9. subsystem initialized to: "07. Variables"
    10. title initialized to: "segfault in [unset]"
    11. type initialized to: "Bug"
  2. Ticket change [c0da5f966c] (rid 102484) by dgp on 2003-05-10 00:24:04:

    1. 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
      }
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  3. Ticket change [d7d57405fe] (rid 107333) by msofer on 2003-05-10 09:26:25:

    1. 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
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  4. Ticket change [23eca77094] (rid 131021) by msofer on 2003-05-13 00:21:50:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      Committed temporary fix by disabling usage of
      tclNsVarNameType, pending better understanding of the issue.
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  5. Ticket change [d5ed628fa1] (rid 123720) by msofer on 2003-05-13 05:48:17:

    1. 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
      
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  6. Ticket change [1dc29cc87e] (rid 90868) by msofer on 2004-03-28 03:22:50:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      Mmhhh ... the bug does not appear in a --enable-symbols=all
      build :(
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  7. Ticket change [e62e212f8e] (rid 104255) by msofer on 2004-03-28 04:39:09:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      It is TCL_MEM_DEBUG that shuts the bug off
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  8. Ticket change [526a5da67c] (rid 126312) by msofer on 2004-03-28 07:27:40:

    1. 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? 
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  9. Ticket change [ff4c905564] (rid 108732) by msofer on 2004-05-22 10:47:32:

    1. closedate changed to: "2004-05-22T03:47:32"
    2. closer changed to: "msofer"
    3. 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 */
      
      
    4. login: "msofer"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "msofer"