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

History Of Ticket 589863ffffffffff

Artifacts Associated With Ticket 589863ffffffffff

  1. Ticket change [3425326c87] (rid 106707) by msofer on 2002-08-01 23:05:41:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      (make test, -DTCL_MEM_DEBUG):
      
      ==== trace-24.5 delete trace during all exec traces
      except enter FAILED
      ==== Contents of test case:
      
          set info {}
          trace add execution foo {leave enterstep leavestep}
      [list traceDelete foo]
          foo 1
          list $info [trace info execution foo]
      
      ---- Result was:
      {{set b 1} entersdep} {}
      ---- Result should have been (exact matching):
      {{set b 1} enterstep} {}
      ==== trace-24.5 FAILED
      
      Note the corrupted "entersdep" ...
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "msofer"
    9. subsystem initialized to: "45. Parsing and Eval"
    10. title initialized to: "corruption in execution traces?"
    11. type initialized to: "Bug"
  2. Add attachment "traceErrors" [7233a130b2] (rid 100814) by msofer on 2002-08-06 03:56:25.

  3. Ticket change [8cc8f881ed] (rid 127794) by msofer on 2002-08-06 03:56:25:

    1. icomment:
      
      
      File Added - 28470: traceErrors
      
      Logged In: YES 
      user_id=148712
      
      There is definitely a memory problem with delete traces; I
      enclose a summary of the relevant errors detected by
      valgrind running with -DPURIFY.
      
      In particular, it reports a read/write of freed memory in
      test 24.5
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. priority changed to: "9 Immediate"
    5. subsystem changed to: "41. Memory Allocation"
    6. username: "msofer"
  4. Ticket change [cecc5d1a5a] (rid 96113) by msofer on 2002-08-06 23:45:28:

    1. assignee changed to: "hobbs"
    2. icomment:
      
      
      File Added - 28537: DIFF.UMR
      
      Logged In: YES 
      user_id=148712
      
      Attached a patch that seems to solve the UMR issue - Jeff,
      could you confirm this is OK?
      
      Wrt the invalid read/write in TclCheckInterpTraces
      (tclCmdMZ.c:4157): this seems to be the cause of the above
      corruption, the error is triggered by 24.5 and also by
      25.10: after calling the trace procedure, we update the
      trace flags and set a pointer to the struct. Trouble is, the
      trace procedure freed the struct's memory. Maybe we should
      Tcl_Preserve the Trace structure?
      
      
    3. login: "msofer"
    4. mimetype: "text/plain"
    5. username: "msofer"
  5. Add attachment "DIFF.UMR" [dbd1442281] (rid 108024) by msofer on 2002-08-06 23:45:28.

  6. Ticket change [ae7a5aae11] (rid 101645) by dkf on 2002-08-07 19:40:18:

    1. assignee changed to: "msofer"
    2. icomment:
      Logged In: YES 
      user_id=79902
      
      Looks good to me (or at least definitely not bad!)
      
      
    3. login: "dkf"
    4. mimetype: "text/plain"
    5. username: "dkf"
  7. Ticket change [c9ef42e50a] (rid 122374) by msofer on 2002-08-07 22:39:26:

    1. assignee changed to: "vincentdarley"
    2. icomment:
      Logged In: YES 
      user_id=148712
      
      Vince, can you please take a look at this? Maybe you
      and/orHemang can help sort it out.
      
      
      
    3. login: "msofer"
    4. mimetype: "text/plain"
    5. username: "msofer"
  8. Ticket change [d6c1637cc8] (rid 123857) by msofer on 2002-08-08 03:45:50:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      Bug 547534 probably refers to this same problem. dkf's
      original report is:
      
       Yuck. With a recent build of Tcl (not quite the HEAD)
      I found this:
      % proc bar {ctx from to op} {
      puts [incr ::i]:[info level 0]
      rename $from {}
      }
      % proc foo args {}
      % trace add command foo delete "bar 1"
      % trace add command foo delete "bar 2"
      % trace add command foo delete "bar 3"
      % rename foo {}
      1:bar 3 foo {} delete
      2:bar 2 foo {} delete
      3:bar 1 elete {} delete
      Looks like there's some memory corruption in there!
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  9. Ticket change [3ddae7205c] (rid 121167) by msofer on 2002-08-12 19:25:30:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      Committed the UMR fix to HEAD: "better intitialize to
      possibly wrong values than using unitialised memory".
      
      The read/write of freed memory is still there.
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  10. Ticket change [6468b1b25a] (rid 92764) by hemanglavana on 2002-08-22 21:53:17:

    1. icomment:
      Logged In: YES 
      user_id=81875
      
      The upload button doesn't show up on my browser, so I
      am attaching the patch here. Please verify whether it resolves
      the memory problem or not.
      
      Index: tclBasic.c
      ===================================================================
      RCS file: /cvsroot/tcl/tcl/generic/tclBasic.c,v
      retrieving revision 1.68
      diff -r1.68 tclBasic.c
      5026c5026
      <     ckfree( (char*) tracePtr );
      ---
      >     Tcl_EventuallyFree( (char*) tracePtr, TCL_DYNAMIC);
      Index: tclCmdMZ.c
      ===================================================================
      RCS file: /cvsroot/tcl/tcl/generic/tclCmdMZ.c,v
      retrieving revision 1.75
      diff -r1.75 tclCmdMZ.c
      4137a4138,4145
      >             /*
      >              * The proc invoked might delete the traced
      command which 
      >              * which might try to free tracePtr.  We want
      to use tracePtr
      >              * until the end of this if section, so we use
      >              * Tcl_Preserve() and Tcl_Release() to be sure
      it is not
      >              * freed while we still need it.
      >              */
      >           Tcl_Preserve((ClientData) tracePtr);
      4159a4168
      >           Tcl_Release((ClientData) tracePtr);
      
      
      
    2. login: "hemanglavana"
    3. mimetype: "text/plain"
    4. username: "hemanglavana"
  11. Ticket change [d23d4368f1] (rid 113499) by msofer on 2002-08-22 22:59:29:

    1. assignee changed to: "msofer"
    2. closedate changed to: "2002-08-22T15:59:29"
    3. closer changed to: "msofer"
    4. icomment:
      Logged In: YES 
      user_id=148712
      
      Yes, the patch fixes the issue. Already committed, thanks
      Hemang!
      
      
    5. login: "msofer"
    6. mimetype: "text/plain"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"
    9. username: "msofer"
  12. Ticket change [c99d5d19cf] (rid 122318) by hemanglavana on 2002-08-28 00:40:05:

    1. icomment:
      Logged In: YES 
      user_id=81875
      
      The upload button doesn't show up on my browser, so I
      am attaching the patch here. Please verify whether it resolves
      the memory problem or not.
      
      Index: tclBasic.c
      ===================================================================
      RCS file: /cvsroot/tcl/tcl/generic/tclBasic.c,v
      retrieving revision 1.68
      diff -r1.68 tclBasic.c
      5026c5026
      <     ckfree( (char*) tracePtr );
      ---
      >     Tcl_EventuallyFree( (char*) tracePtr, TCL_DYNAMIC);
      Index: tclCmdMZ.c
      ===================================================================
      RCS file: /cvsroot/tcl/tcl/generic/tclCmdMZ.c,v
      retrieving revision 1.75
      diff -r1.75 tclCmdMZ.c
      4137a4138,4145
      >             /*
      >              * The proc invoked might delete the traced
      command which 
      >              * which might try to free tracePtr.  We want
      to use tracePtr
      >              * until the end of this if section, so we use
      >              * Tcl_Preserve() and Tcl_Release() to be sure
      it is not
      >              * freed while we still need it.
      >              */
      >           Tcl_Preserve((ClientData) tracePtr);
      4159a4168
      >           Tcl_Release((ClientData) tracePtr);
      
      
      
    2. login: "hemanglavana"
    3. mimetype: "text/plain"
    4. username: "hemanglavana"