Index: generic/tclExecute.c =================================================================== RCS file: /cvsroot/tcl/tcl/generic/tclExecute.c,v retrieving revision 1.19 diff -u -r1.19 tclExecute.c --- generic/tclExecute.c 2001/03/02 15:31:15 1.19 +++ generic/tclExecute.c 2001/03/09 14:36:09 @@ -639,7 +639,19 @@ (unsigned int)(pc - codePtr->codeStart), (unsigned int) stackTop, (unsigned int) initStackTop); - panic("TclExecuteByteCode execution failure: end stack top != start stack top"); + if (stackTop > initStackTop) { + /* + * Extra items on stack; this bytecode is defective, but + * apparently did not corrupt any other data + */ + result = TCL_ERROR; + goto abnormalReturn; + } else { + /* + * Too few items on the stack, massive data corruption + */ + panic("TclExecuteByteCode execution failure: end stack top != start stack top"); + } } TRACE_WITH_OBJ(("=> return code=%d, result=", result), iPtr->objResultPtr);