Skip to content
Tcl Source Code History Of Ticket 1578454
Login

History Of Ticket 1578454

Artifacts Associated With Ticket 1578454

  1. Ticket change [c0f2a55e64] (rid 102511) by mpc_janssen on 2006-10-16 19:44:46:

    1. assignee initialized to: "hobbs"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      When apply is called using Tcl_EvalObjv, memory is 
      being leaked that doesn't seem possible to reclaim.
      If puts is used as command instead of apply no memory 
      is lost. 
      Attached a small C lib which defines two commands 
      doputs and doapply where the only difference is the 
      contents of objv[0] in the Tcl_EvalObjv call. doapply 
      leaks, doputs doesn't.
      
      System info:
      
      % parray tcl_platform
      tcl_platform(byteOrder) = littleEndian
      tcl_platform(machine)   = intel
      tcl_platform(os)        = Windows NT
      tcl_platform(osVersion) = 5.1
      tcl_platform(platform)  = windows
      tcl_platform(threaded)  = 1
      tcl_platform(user)      = mjanssen
      tcl_platform(wordSize)  = 4
      % info patchlevel
      8.5a5
      
      
    4. foundin initialized to: "obsolete: 8.5a5"
    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: "mpc_janssen"
    10. subsystem initialized to: "42. Memory Preservation"
    11. title initialized to: "Tcl_EvalObjv leaks memory when calling apply"
    12. type initialized to: "Bug"
  2. Ticket change [4791b0afd9] (rid 99728) by mpc_janssen on 2006-10-17 02:44:46:

    1. icomment:
      
      
      File Added - 198467: apply.zip
      
      
      
    2. login: "mpc_janssen"
    3. mimetype: "text/plain"
    4. username: "mpc_janssen"
  3. Add attachment "apply.zip" [848bde260d] (rid 117571) by mpc_janssen on 2006-10-17 02:44:46.

  4. Ticket change [63ff69d873] (rid 92674) by mpc_janssen on 2006-10-17 02:58:30:

    1. icomment:
      Logged In: YES 
      user_id=1463011
      
      Attached the memory trace for the following script:
      
      memory trace on
      load leak.dll
      
      time {
          doapply
      } 5
      
      A quick glance seems to indicate that memory allocated in 
      tclCompile.c 1706 is only sparingly freed:
      
      > cat mem.out | grep 124
      ckalloc 995860 124 ..\generic\tclCompile.c 1706
      ckalloc 995cc0 124 ..\generic\tclCompile.c 1706
      ckalloc 996850 124 ..\generic\tclCompile.c 1706
      ckalloc 9966b0 124 ..\generic\tclCompile.c 1706
      ckalloc 9964e0 124 ..\generic\tclCompile.c 1706
      ckalloc 996310 124 ..\generic\tclCompile.c 1706
      ckfree 995860 124 ..\generic\tclCompile.c 749
      ckalloc 993ad0 124 ..\generic\tclCompile.c 1706
      
      
    2. login: "mpc_janssen"
    3. mimetype: "text/plain"
    4. username: "mpc_janssen"
  5. Add attachment "mem.out" [d8150494a2] (rid 107378) by mpc_janssen on 2006-10-17 02:58:30.

  6. Ticket change [fce8a33e94] (rid 108314) by mpc_janssen on 2006-10-17 02:58:31:

    1. icomment:
      
      
      File Added - 198471: mem.out
      
      
      
    2. login: "mpc_janssen"
    3. mimetype: "text/plain"
    4. username: "mpc_janssen"
  7. Ticket change [11a291199c] (rid 95184) by msofer on 2006-10-17 03:11:10:

    1. assignee changed to: "msofer"
    2. icomment:
      Logged In: YES 
      user_id=148712
      
      New test added to show the leak of the internal rep:
      
      ==== apply-9.1 leaking internal rep FAILED
      ==== Contents of test case:
      
          set end [getbytes]
          for {set i 0} {$i < 5} {incr i} {
              ::apply [lrange $lam 0 end]
              set tmp $end
              set end [getbytes]
          }
          set leakedBytes [expr {$end - $tmp}]
      
      ---- Result was:
      222
      ---- Result should have been (exact matching):
      0
      ==== apply-9.1 FAILED
      
      
      
    3. login: "msofer"
    4. mimetype: "text/plain"
    5. username: "msofer"
  8. Ticket change [258a7e926f] (rid 88189) by msofer on 2006-10-17 03:11:33:

    1. priority changed to: "9 Immediate"
  9. Ticket change [f2c164ec08] (rid 109607) by msofer on 2006-10-17 03:40:26:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      Fixed in HEAD; thanks
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. status changed to: "Closed"
    5. username: "msofer"
  10. Ticket change [b105140412] (rid 98078) by msofer on 2006-10-17 03:40:27:

    1. closedate changed to: "2006-10-16T20:40:27"
    2. closer changed to: "msofer"
    3. resolution changed to: "Fixed"