Skip to content
Tcl Source Code History Of Ticket 1191369fffffffffffffffffffffffffffffffff
Login

History Of Ticket 1191369fffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 1191369fffffffffffffffffffffffffffffffff

  1. Ticket change [ca50598aa6] (rid 95322) by nobody on 2005-04-27 22:54:59:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Copied email exchanges with Jeff.
      
      Hi Eric,
       
      Yes, I was able to repro it with a mem_debug build.  I 
      also found that it is related to TCL_LINK_READ_ONLY - 
      if you remove that, the error does not occur.  You should 
      file this at http://tcl.sourceforge.net/ where it can be 
      tracked through to fix.
       
      Regards,
        Jeff Hobbs, The Tcl Guy
        http://www.ActiveState.com/, a division of Sophos 
      
      -----Original Message-----
      From: Tse, Eric [mailto:[email protected]] 
      Sent: April 26, 2005 3:23 PM
      To: [email protected]
      Subject: RE: Tcl_LinkVar reproduced
      
      
      Hi Jeff,
      
       
      
      Can you reproduce it? Thanks,
      
       
      
      ERic
      
       
      
      
      --------------------------------------------------------------------------------
      
      From: Tse, Eric 
      Sent: Tuesday, April 26, 2005 11:31 AM
      To: '[email protected]'
      Subject: Tcl_LinkVar reproduced
      
       
      
      Hi Jeff,
      
       
      
      Here is the diff from 8.4.9:
      
       
      
      *** tclTest.c   Tue Apr 26 11:11:02 2005
      
      --- tclTest.c~  Mon Aug 30 12:58:48 2004
      
      ***************
      
      *** 2482,2490 ****
      
         *----------------------------------------------------------------------
      
         */
      
        
      
      - static int eric1 = 0;
      
      - static int eric2 = 0;
      
      - 
      
              /* ARGSUSED */
      
        static int
      
        TestlinkCmd(dummy, interp, argc, argv)
      
      --- 2482,2487 ----
      
      ***************
      
      *** 2502,2510 ****
      
            char buffer[2*TCL_DOUBLE_SPACE];
      
            int writable, flag;
      
            Tcl_Obj *tmp;
      
      - 
      
      -     Tcl_LinkVar(interp, "eric_var", (char *) &eric1, 
      TCL_LINK_INT | TCL_LINK_READ_ONLY);
      
      -     Tcl_LinkVar(interp, "eric_var", (char *) &eric2, 
      TCL_LINK_INT | TCL_LINK_READ_ONLY);
      
        
      
            if (argc < 2) {
      
              Tcl_AppendResult(interp, "wrong # args: should be 
      \"", argv[0],
      
      --- 2499,2504 ----
      
       
      
       
      
       
      
      Steps to reproduce:
      
      -          gmake tcltest
      
      -          tcltest
      
      -          type “testlink” on the prompt
      
       
      
       
      
      etse.cad889 [~/tmp/tcl8.4.9/unix]% tcltest
      
      % testlink
      
      file = ../generic/tclLink.c, line = 119
      
      Trying to decrement refCount of previously disposed 
      object.
      
      Abort
      
       
      
      Thanks,
      
      Eric
      
      
    4. foundin initialized to: "obsolete: 8.4.9"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "07. Variables"
    10. title initialized to: "Tcl_LinkVar memory corruption causing crashes"
    11. type initialized to: "Bug"
  2. Ticket change [a3951801ef] (rid 110064) by msofer on 2005-10-22 10:14:42:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      This flew under my radar - upping prio to check for presence
      in 8.4 and HEAD.
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. priority changed to: "9 Immediate"
    5. username: "msofer"
  3. Ticket change [566f03af24] (rid 94314) by msofer on 2005-10-22 22:27:35:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      The problem is that Tcl_LinkVar tries to set the variable to
      an obj with refCount 0. If that fails due to a trace (in the
      example, because the variable was read only), the obj's
      refcount is decremented by the SetVar code before returning,
      and the obj is freed. Therefore, the code in Tcl_LinkVar
      should not decrRefCount again.
      
      This is a special of [Bug 1334947], which supersedes it.
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. resolution changed to: "Duplicate"
    5. status changed to: "Closed"
    6. username: "msofer"
  4. Ticket change [5de2ecee6d] (rid 115546) by msofer on 2005-10-22 22:27:36:

    1. closedate changed to: "2005-10-22T15:27:36"
    2. closer changed to: "msofer"