summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--generic/tclBasic.c7
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 27c78b5..8b49f58 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-03-23 Miguel Sofer <msofer@users.sf.net>
+
+ * generic/tclBasic.c (DeleteInterpProc): pop the root frame
+ pointer before deleting the global namespace [Bug 1658572]
+
2007-03-23 Kevin B. Kenny <kennykb@acm.org>
* win/Makefile.in: Added code to keep a Cygwin path name from
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 548bcc3..43e570e 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.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: tclBasic.c,v 1.238 2007/03/19 16:59:08 dgp Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.239 2007/03/23 19:59:34 msofer Exp $
*/
#include "tclInt.h"
@@ -1214,16 +1214,17 @@ DeleteInterpProc(
}
/*
- * Finish deleting the global namespace.
+ * Pop the root frame pointer and finish deleting the global
+ * namespace. The order is important [Bug 1658572].
*/
- Tcl_DeleteNamespace((Tcl_Namespace *) iPtr->globalNsPtr);
if (iPtr->framePtr != iPtr->rootFramePtr) {
Tcl_Panic("DeleteInterpProc: popping rootCallFrame with other frames on top");
}
Tcl_PopCallFrame(interp);
ckfree((char *)iPtr->rootFramePtr);
iPtr->rootFramePtr = NULL;
+ Tcl_DeleteNamespace((Tcl_Namespace *) iPtr->globalNsPtr);
/*
* Free up the result *after* deleting variables, since variable deletion