Skip to content
Tcl Source Code History Of Ticket 1740631
Login

History Of Ticket 1740631

Artifacts Associated With Ticket 1740631

  1. Ticket change [254ed32d79] (rid 88149) by nobody on 2007-06-20 23:22:43:

    1. assignee initialized to: "hobbs"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Solaris 10 on sparc
      
      Calling Tcl_UnlinkVar in a callback that is invoked by Tcl_UpdateLinkedVar causes memory corruption because linkPtr is used after it has been freed.
      
      Here is a patch to fix the problem by making a second call to Tcl_VarTraceInfo.
      
      --- tcl8.4.15/generic/tclLink.c       2007-05-10 11:23:58.000000000 -0700
      +++ tcl8.4.15-new/generic/tclLink.c   2007-06-20 14:19:24.792783000 -0700
      @@ -206,6 +206,12 @@
           Tcl_IncrRefCount(objPtr);
           Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, objPtr, TCL_GLOBAL_ONLY);
           Tcl_DecrRefCount(objPtr);
      +    /* Callback may have unlinked the variable */
      +    linkPtr = (Link *) Tcl_VarTraceInfo(interp, varName, TCL_GLOBAL_ONLY,
      +           LinkTraceProc, (ClientData) NULL);
      +    if (linkPtr == NULL) {
      +       return;
      +    }
           linkPtr->flags = (linkPtr->flags & ~LINK_BEING_UPDATED) | savedFlag;
       }
      
      
    4. foundin initialized to: "obsolete: 8.4.15"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "nobody"
    10. subsystem initialized to: "09. Linked C Variables"
    11. title initialized to: "Memory corruption in Tcl_UpdateLinkedVar"
    12. type initialized to: "Bug"
  2. Ticket change [fc7af5e039] (rid 108248) by dkf on 2007-06-21 17:48:35:

    1. priority changed to: "9 Immediate"
  3. Ticket change [99da1ed6ae] (rid 110859) by emaros on 2007-07-17 02:59:08:

    1. icomment:
      Logged In: YES 
      user_id=334297
      Originator: NO
      
      This patch has allowed our application to run continuously for several weeks where before we would have aborts once a day.
      
      
    2. login: "emaros"
    3. mimetype: "text/plain"
    4. username: "emaros"
  4. Ticket change [e087812afd] (rid 115214) by hobbs on 2007-09-11 06:06:42:

    1. closedate changed to: "2007-09-10T23:06:42"
    2. closer changed to: "hobbs"
    3. icomment:
      Logged In: YES 
      user_id=72656
      Originator: NO
      
      In 8.4.16 and 8.5b1.
      
      
    4. login: "hobbs"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "hobbs"