summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2007-10-03 12:53:11 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2007-10-03 12:53:11 (GMT)
commit7ef1a38f9b1cb3003a304fa658e12670997d8f10 (patch)
tree0978762bb0d9abe8a8ca37877e958cbcaeb91ed0
parent3ce49f0af3212068d040f16c495e59d53b3fdb5e (diff)
downloadtcl-7ef1a38f9b1cb3003a304fa658e12670997d8f10.zip
tcl-7ef1a38f9b1cb3003a304fa658e12670997d8f10.tar.gz
tcl-7ef1a38f9b1cb3003a304fa658e12670997d8f10.tar.bz2
* generic/tclObj.c (Tcl_FindCommandFromObj): fix finding a deleted
command; cannot trigger this from Tcl itself, but crash reported on xotcl. This check is new to 8.4 but exists in 8.5, so this is a backport or something. Thanks Gustaf Neumann.
-rw-r--r--ChangeLog7
-rw-r--r--generic/tclObj.c5
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index b298155..09aab5e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-10-03 Miguel Sofer <msofer@users.sf.net>
+
+ * generic/tclObj.c (Tcl_FindCommandFromObj): fix finding a deleted
+ command; cannot trigger this from Tcl itself, but crash reported
+ on xotcl. This check is new to 8.4 but exists in 8.5, so this is a
+ backport or something. Thanks Gustaf Neumann.
+
2007-10-02 Jeff Hobbs <jeffh@ActiveState.com>
* generic/tcl.h (Tcl_DecrRefCount): Update change from 2006-05-29
diff --git a/generic/tclObj.c b/generic/tclObj.c
index 092dc1a..16454ac 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclObj.c,v 1.42.2.15 2007/09/13 15:28:13 das Exp $
+ * RCS: @(#) $Id: tclObj.c,v 1.42.2.16 2007/10/03 12:53:12 msofer Exp $
*/
#include "tclInt.h"
@@ -3015,7 +3015,8 @@ Tcl_GetCommandFromObj(interp, objPtr)
&& (resPtr->refNsId == currNsPtr->nsId)
&& (resPtr->refNsCmdEpoch == currNsPtr->cmdRefEpoch)) {
cmdPtr = resPtr->cmdPtr;
- if (cmdPtr->cmdEpoch != resPtr->cmdEpoch) {
+ if (cmdPtr->cmdEpoch != resPtr->cmdEpoch
+ || (cmdPtr->flags & CMD_IS_DELETED)) {
cmdPtr = NULL;
}
}