From 30e22dc7a202f75004fcafaa953b6470e7e1101f Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Sat, 31 Jul 2010 18:10:10 +0000 Subject: * generic/tclVar.c: fix for crash [Bug 3037525]: lose fickle optimisation in TclDeleteVars (used for runtime-created locals) --- ChangeLog | 5 +++++ generic/tclVar.c | 10 +++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 30e158b..6e8ca1c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-07-28 Miguel Sofer + + * generic/tclVar.c: fix for crash [Bug 3037525]: lose fickle + optimisation in TclDeleteVars (used for runtime-created locals) + 2010-07-25 Jan Nijtmans * 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); } -- cgit v0.12