summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--generic/tclOOMethod.c9
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 7ece66a..baf8db6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2008-08-08 Don Porter <dgp@users.sourceforge.net>S
+ * generic/tclOOMethod.c (PushMethodCallFrame): Added missing check
+ for bytecode validity. [Bug 2037727]
+
* generic/tclProc.c (TclProcCompileProc): On recompile of
a proc, clear away any entries on the CompiledLocal list from the
previous compile. This will prevent compile of temporary variables
diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c
index f17b09b..c977a3b 100644
--- a/generic/tclOOMethod.c
+++ b/generic/tclOOMethod.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclOOMethod.c,v 1.12 2008/08/09 00:15:09 das Exp $
+ * RCS: @(#) $Id: tclOOMethod.c,v 1.13 2008/08/12 17:51:03 dgp Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -787,14 +787,17 @@ PushMethodCallFrame(
fdPtr->cmd.clientData = &fdPtr->efi;
pmPtr->procPtr->cmdPtr = &fdPtr->cmd;
- if (pmPtr->procPtr->bodyPtr->typePtr != &tclByteCodeType) {
+ /*
+ * [Bug 2037727] Always call TclProcCompileProc so that we check not
+ * only that we have bytecode, but also that it remains valid.
+ */
+
result = TclProcCompileProc(interp, pmPtr->procPtr,
pmPtr->procPtr->bodyPtr, (Namespace *) nsPtr,
"body of method", namePtr);
if (result != TCL_OK) {
return result;
}
- }
/*
* Make the stack frame and fill it out with information about this call.