Overview
| Artifact ID: | 34f3c948074d6cd5ec2361eb2b8e7c245a6a5806 |
|---|---|
| Ticket: | 3392070fffffffffffffffffffffffffffffffff
literal leak with delayed compile [subst] |
| User & Date: | dgp on 2011-08-16 02:39:24 |
Changes
- icomment:
Reduced leak demonstration... $ cat a.tcl source b.tcl $ cat b.tcl proc foo {} { regexp . x j return $j } foo subst \j $ valgrind ./tcltest a.tcl ... ==6105== 292 (48 direct, 244 indirect) bytes in 1 blocks are definitely lost in loss record 23 of 24 ==6105== at 0x4A05E1C: malloc (vg_replace_malloc.c:195) ==6105== by 0x498654: Tcl_Alloc (in /local/tmp/dgp/fossil/tcl-only/unix/tcltest) ==6105== by 0x4FB2CA: TclCreateLiteral (in /local/tmp/dgp/fossil/tcl-only/unix/tcltest) ==6105== by 0x4FB501: TclRegisterLiteral (in /local/tmp/dgp/fossil/tcl-only/unix/tcltest) ==6105== by 0x4CF24A: TclCompileTokens (in /local/tmp/dgp/fossil/tcl-only/unix/tcltest) ==6105== by 0x4CE6A6: TclCompileScript (in /local/tmp/dgp/fossil/tcl-only/unix/tcltest) ==6105== by 0x4D0A6B: TclSetByteCodeFromAny (in /local/tmp/dgp/fossil/tcl-only/unix/tcltest) ==6105== by 0x4D0BB6: SetByteCodeFromAny (in /local/tmp/dgp/fossil/tcl-only/unix/tcltest) ==6105== by 0x4E5065: TclCompileObj (in /local/tmp/dgp/fossil/tcl-only/unix/tcltest) ==6105== by 0x494338: TclNREvalObjEx (in /local/tmp/dgp/fossil/tcl-only/unix/tcltest) Debugging prints show the literal "j" is not released by TclDeleteLiteralTable() due to a surplus refcount. - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"