summaryrefslogtreecommitdiffstats
path: root/generic/tclCompCmds.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-06-06 16:55:08 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-06-06 16:55:08 (GMT)
commit1486f60b5f64b30894635c951cc50d6aeb2cc8a1 (patch)
treece898d79c4f6a144440865bce8dbdea55547beb7 /generic/tclCompCmds.c
parentdeb30edf39eedf62f9b626a56fa6fa428cb46825 (diff)
downloadtcl-1486f60b5f64b30894635c951cc50d6aeb2cc8a1.zip
tcl-1486f60b5f64b30894635c951cc50d6aeb2cc8a1.tar.gz
tcl-1486f60b5f64b30894635c951cc50d6aeb2cc8a1.tar.bz2
3614382 Fix stack management of compiled [dict for] by shifting limits
of the catch range.
Diffstat (limited to 'generic/tclCompCmds.c')
-rw-r--r--generic/tclCompCmds.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 7324360..92dfcb4 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -1496,9 +1496,6 @@ CompileDictEachCmd(
*/
CompileWord(envPtr, dictTokenPtr, interp, 3);
- TclEmitInstInt4( INST_DICT_FIRST, infoIndex, envPtr);
- emptyTargetOffset = CurrentOffset(envPtr);
- TclEmitInstInt4( INST_JUMP_TRUE4, 0, envPtr);
/*
* Now we catch errors from here on so that we can finalize the search
@@ -1509,6 +1506,10 @@ CompileDictEachCmd(
TclEmitInstInt4( INST_BEGIN_CATCH4, catchRange, envPtr);
ExceptionRangeStarts(envPtr, catchRange);
+ TclEmitInstInt4( INST_DICT_FIRST, infoIndex, envPtr);
+ emptyTargetOffset = CurrentOffset(envPtr);
+ TclEmitInstInt4( INST_JUMP_TRUE4, 0, envPtr);
+
/*
* Inside the iteration, write the loop variables.
*/