Overview
| Artifact ID: | 8cdcdf321d904322b35e6b4dff36f643b2085105 |
|---|---|
| Ticket: | 3392735fffffffffffffffffffffffffffffffff
Deep [exit] leaks one obj per stack level and local var. |
| User & Date: | ferrieux on 2011-08-16 22:45:42 |
Changes
- assignee changed to: "msofer"
- cmimetype changed to: "text/plain"
- comment changed to:
With a -DPURIFY build, --enable-symbols: proc deep n { if {$n<1} exit deep [expr {$n-1}] } deep [lindex $argv 0] valgrind --leak-check=yes ./tclsh deep.tcl 10 ==2940== 27 (24 direct, 3 indirect) bytes in 1 blocks are definitely lost in loss record 33 of 50 ==2940== at 0x4005BDC: malloc (vg_replace_malloc.c:195) ==2940== by 0x402EFB8: TclpAlloc (tclAlloc.c:705) ==2940== by 0x403F188: Tcl_Alloc (tclCkalloc.c:1046) ==2940== by 0x4107C18: Tcl_NewStringObj (tclStringObj.c:340) ==2940== by 0x40E6CA4: NewNativeObj (tclMain.c:67) ==2940== by 0x40E7148: Tcl_MainEx (tclMain.c:359) ==2940== by 0x40E7977: Tcl_Main (tclMain.c:634) ==2940== by 0x8048634: main (tclAppInit.c:84) ==2940== ==2940== 216 bytes in 9 blocks are definitely lost in loss record 46 of 50 ==2940== at 0x4005BDC: malloc (vg_replace_malloc.c:195) ==2940== by 0x402EFB8: TclpAlloc (tclAlloc.c:705) ==2940== by 0x403F188: Tcl_Alloc (tclCkalloc.c:1046) ==2940== by 0x40F0286: Tcl_NewWideIntObj (tclObj.c:2909) ==2940== by 0x40ACFC1: TEBCresume (tclExecute.c:5128) ==2940== by 0x40343EA: TclNRRunCallbacks (tclBasic.c:4311) ==2940== by 0x4033EE0: Tcl_EvalObjv (tclBasic.c:4103) ==2940== by 0x4035C32: TclEvalEx (tclBasic.c:5209) ==2940== by 0x4035258: Tcl_EvalEx (tclBasic.c:4867) ==2940== by 0x40DE382: Tcl_FSEvalFileEx (tclIOUtil.c:1751) ==2940== by 0x40E72F6: Tcl_MainEx (tclMain.c:407) ==2940== by 0x40E7977: Tcl_Main (tclMain.c:634) Clearly, although full finalization has been requested, one extra obj remains for each stack level. Experimenting with extra locals in the recursive proc seems to indicate one leak per local variable. - foundin changed to: "None"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "ferrieux"
- subsystem changed to: "10. Objects"
- title changed to:
Deep [exit] leaks one obj per stack level and local var.
- type changed to: "Bug"