From d2695cf0343eae37d19350fa68f4028c2dc8e3ec Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sat, 9 Oct 2010 16:31:28 +0000 Subject: * generic/tclExecute.c: fix overallocation of exec stack in TEBC (mixing numwords and numbytes) --- ChangeLog | 5 +++++ generic/tclExecute.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 05eb6ab..aa522fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-10-09 Miguel Sofer + + * generic/tclExecute.c: fix overallocation of exec stack in TEBC + (mixing numwords and numbytes) + 2010-10-01 Jeff Hobbs * generic/tclExecute.c (EvalStatsCmd): change 'evalstats' to diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 40f513a..d70fcba 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -13,7 +13,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.369.2.17 2010/10/04 05:23:47 hobbs Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.369.2.18 2010/10/09 16:31:28 msofer Exp $ */ #include "tclInt.h" @@ -1799,8 +1799,8 @@ TclExecuteByteCode( catchTop = initCatchTop = (ptrdiff_t *) ( GrowEvaluationStack(iPtr->execEnvPtr, - codePtr->maxExceptDepth + sizeof(CmdFrame) + - codePtr->maxStackDepth, 0) - 1); + (sizeof(CmdFrame) + sizeof(Tcl_Obj *) - 1)/sizeof(Tcl_Obj *) + + codePtr->maxExceptDepth + codePtr->maxStackDepth, 0) - 1); bcFramePtr = (CmdFrame *) (initCatchTop + codePtr->maxExceptDepth + 1); tosPtr = initTosPtr = ((Tcl_Obj **) (bcFramePtr + 1)) - 1; esPtr = iPtr->execEnvPtr->execStackPtr; -- cgit v0.12