From: SourceForge.net <no...@so...> - 2011-08-06 10:46:32
|
Bugs item #3386417, was opened at 2011-08-05 01:03 Message generated for change (Comment added) made by ferrieux You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=3386417&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 47. Bytecode Compiler Group: development: 8.6b2 Status: Open Resolution: None Priority: 5 Private: No Submitted By: miguel sofer (msofer) >Assigned to: miguel sofer (msofer) Summary: errorstack leaked on syntax error Initial Comment: When the compiler bails out on a syntax error, the errorstack is leaked. For example, for the script namespace eval x {set syntax {}{}} valgrind reports 0: malloc (vg_replace_malloc.c:236) 1: TclpAlloc (tclAlloc.c:705) 2: Tcl_Alloc (tclCkalloc.c:1046) 3: Tcl_NewListObj (tclListObj.c:225) 4: Tcl_CreateInterp (tclBasic.c:542) 5: Tcl_Main (tclMain.c:639) 6: main (tclAppInit.c:84) -- foo: ==9070== 3,248 (48 direct, 3,200 indirect) bytes in 1 blocks are definitely lost in loss record 136 of 136 ---------------------------------------------------------------------- >Comment By: Alexandre Ferrieux (ferrieux) Date: 2011-08-06 12:46 Message: Quick analysis shows that an extra ref (to errorstack, but also to other return options) is kept in an options-dict computed by CompileReturnInternal. That dict is soldered into a literal (TclAddLiteralObj), so it looks like the lifecycle of that literal is the culprit. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=3386417&group_id=10894 |