Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 46e0b11cbe0990de76c6b3d224a8cb43f9d53039
Ticket: 604609ffffffffffffffffffffffffffffffffff
leak in command rename traces
User & Date: msofer on 2002-09-04 16:42:01
Changes

  1. assignee changed to: "msofer"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    The following scriptlet leaks two structs: a
    TraceCommandInfo and a Command
    
    # distilled from test trace-20.9 
    #
    # No leak if the trace really renames and does
    # not delete
    
    proc foo x {set x}
    trace add command foo rename {rename foo "";#}
    rename foo bar
    
    Valgrind's complaint:
    
    40 bytes in 1 blocks are definitely lost in loss record
    3 of 7
     at 0x400467C4: malloc (vg_clientfuncs.c:100)
     by 0x80F9571: TclpAlloc (./../generic/tclAlloc.c:679)
     by 0x806B501: Tcl_Alloc (./../generic/tclCkalloc.c:1002)
     by 0x807A50B: TclTraceCommandObjCmd
    (./../generic/tclCmdMZ.c:3385)
     by 0x80798D6: Tcl_TraceObjCmd
    (./../generic/tclCmdMZ.c:2932)
     by 0x8066091: TclEvalObjvInternal
    (./../generic/tclBasic.c:3033)
    
    56 bytes in 1 blocks are definitely lost in loss record
    4 of 7
     at 0x400467C4: malloc (vg_clientfuncs.c:100)
     by 0x80F9571: TclpAlloc (./../generic/tclAlloc.c:679)
     by 0x806B501: Tcl_Alloc (./../generic/tclCkalloc.c:1002)
     by 0x8064813: Tcl_CreateCommand
    (./../generic/tclBasic.c:1512)
     by 0x80CC92E: Tcl_ProcObjCmd (./../generic/tclProc.c:136)
     by 0x8066091: TclEvalObjvInternal
    (./../generic/tclBasic.c:3033)
    
    
  4. foundin changed to: "None"
  5. priority changed to: "8"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "msofer"
  9. subsystem changed to: "45. Parsing and Eval"
  10. title changed to: "leak in command rename traces"
  11. type changed to: "Bug"