Subject: 3614382 Fix stack management of compiled [dict for] by shifting limits of the catch range.

From: dgp <[email-masked]>
Date: Thu, 6 Jun 2013 16:55:08 +0000

---
 generic/tclCompCmds.c | 7 ++++---
 1 file 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.
      */
-- 
cgit v0.12