summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-05-29 17:20:29 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-05-29 17:20:29 (GMT)
commit4489ec6866f73246dd1654e0e98fc5fb431a170d (patch)
treeb9cef2c0bd1c8227af75edbd58ce327f0edd853b /generic
parent38ae5eca7ffd791e3b3b092969700ef6ee56ba19 (diff)
downloadtcl-4489ec6866f73246dd1654e0e98fc5fb431a170d.zip
tcl-4489ec6866f73246dd1654e0e98fc5fb431a170d.tar.gz
tcl-4489ec6866f73246dd1654e0e98fc5fb431a170d.tar.bz2
3614102 - Reset stack housekeeping when compileProc fails.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclCompile.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index dd179ea..039a694 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -2069,9 +2069,7 @@ TclCompileScript(
unsigned savedCodeNext =
envPtr->codeNext - envPtr->codeStart;
int update = 0;
-#ifdef TCL_COMPILE_DEBUG
int startStackDepth = envPtr->currStackDepth;
-#endif
/*
* Mark the start of the command; the proper bytecode
@@ -2164,6 +2162,12 @@ TclCompileScript(
envPtr->numCommands = savedNumCmds;
envPtr->codeNext = envPtr->codeStart + savedCodeNext;
+
+ /*
+ * And the stack depth too!! [Bug 3614102].
+ */
+
+ envPtr->currStackDepth = startStackDepth;
}
/*