diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2010-07-31 18:10:10 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2010-07-31 18:10:10 (GMT) |
commit | 30e22dc7a202f75004fcafaa953b6470e7e1101f (patch) | |
tree | 1d5a920156b435c85f7494ad643f62ffe848a9d9 | |
parent | 5cbb5a46c8f2983cc68798d12d55b96cf0f1ec4f (diff) | |
download | tcl-30e22dc7a202f75004fcafaa953b6470e7e1101f.zip tcl-30e22dc7a202f75004fcafaa953b6470e7e1101f.tar.gz tcl-30e22dc7a202f75004fcafaa953b6470e7e1101f.tar.bz2 |
* generic/tclVar.c: fix for crash [Bug 3037525]: lose fickle
optimisation in TclDeleteVars (used for runtime-created locals)
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | generic/tclVar.c | 10 |
2 files changed, 8 insertions, 7 deletions
@@ -1,3 +1,8 @@ +2010-07-28 Miguel Sofer <msofer@users.sf.net> + + * generic/tclVar.c: fix for crash [Bug 3037525]: lose fickle + optimisation in TclDeleteVars (used for runtime-created locals) + 2010-07-25 Jan Nijtmans <nijtmans@users.sf.net> * generic/tclInt.h [Bug 3030870] make itcl 3.x built with pre-8.6 work in 8.6 diff --git a/generic/tclVar.c b/generic/tclVar.c index 36db617..c23681f 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.160.2.9 2010/02/03 13:28:44 dkf Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.160.2.10 2010/07/31 18:10:11 msofer Exp $ */ #include "tclInt.h" @@ -4521,14 +4521,10 @@ TclDeleteVars( } for (varPtr = VarHashFirstVar(tablePtr, &search); varPtr != NULL; - varPtr = VarHashNextVar(&search)) { - /* - * Lie about the validity of the hashtable entry. In this way the - * variables will be deleted by VarHashDeleteTable. - */ + varPtr = VarHashFirstVar(tablePtr, &search)) { - VarHashInvalidateEntry(varPtr); UnsetVarStruct(varPtr, NULL, iPtr, VarHashGetKey(varPtr), NULL, flags); + VarHashDeleteEntry(varPtr); } VarHashDeleteTable(tablePtr); } |