summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2009-03-21 06:55:31 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2009-03-21 06:55:31 (GMT)
commit0a098f986c82c3df2107386ae53a6e40da726c27 (patch)
treed4781b76df25ff06364342a5a3f13c19286924aa /generic
parent4ff9be7699dc5b15cd2272692d62e89432866d64 (diff)
downloadtcl-0a098f986c82c3df2107386ae53a6e40da726c27.zip
tcl-0a098f986c82c3df2107386ae53a6e40da726c27.tar.gz
tcl-0a098f986c82c3df2107386ae53a6e40da726c27.tar.bz2
* generic/tclExecute.c: proper fix for [Bug 2415422]. Reenabled
* tests/nre.test: the failing assertion that was disabled on 2008-12-18: the assertion is correct, the fault was in the management of expansions.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclExecute.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 56bace2..99bf84e 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -14,7 +14,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclExecute.c,v 1.431 2009/03/21 03:43:53 msofer Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.432 2009/03/21 06:55:31 msofer Exp $
*/
#include "tclInt.h"
@@ -1987,9 +1987,7 @@ TclExecuteByteCode(
* reset, now process the return.
*/
- /* Disabled the following assertion to solve the trouble reported
- * in Tcl Bug 2415422. Needs review. */
- /*NRE_ASSERT(iPtr->cmdFramePtr == bcFramePtr);*/
+ NRE_ASSERT(iPtr->cmdFramePtr == bcFramePtr);
iPtr->cmdFramePtr = bcFramePtr->nextPtr;
/*
@@ -2592,15 +2590,20 @@ TclExecuteByteCode(
if (moved) {
/*
- * Change the global data to point to the new stack.
+ * Change the global data to point to the new stack: move the
+ * bottomPtr, recompute the position of every other
+ * stack-allocated parameter, update the stack pointers.
*/
bottomPtr = (BottomData *) (((Tcl_Obj **)bottomPtr) + moved);
- initCatchTop += moved;
+
+ bcFramePtr = (CmdFrame *) (bottomPtr + 1);
+ initCatchTop = ((ptrdiff_t *) (bcFramePtr + 1)) - 1;
+ initTosPtr = (Tcl_Obj **) (initCatchTop + codePtr->maxExceptDepth);
+ esPtr = iPtr->execEnvPtr->execStackPtr;
+
catchTop += moved;
- initTosPtr += moved;
tosPtr += moved;
- esPtr = iPtr->execEnvPtr->execStackPtr;
}
/*