diff options
author | hobbs <hobbs> | 2001-03-31 07:57:31 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2001-03-31 07:57:31 (GMT) |
commit | fc917e03f0febbf3d08e3490a28a9b99cd14c8e4 (patch) | |
tree | cf93ab95d068a0d81efb65a15ce50afd65167b20 | |
parent | bac1f905835bd292a9b98b9f085e389ffd0437e0 (diff) | |
download | tcl-fc917e03f0febbf3d08e3490a28a9b99cd14c8e4.zip tcl-fc917e03f0febbf3d08e3490a28a9b99cd14c8e4.tar.gz tcl-fc917e03f0febbf3d08e3490a28a9b99cd14c8e4.tar.bz2 |
* generic/tclCkalloc.c (TclFinalizeMemorySubsystem): set curTagPtr
to NULL to allow for reuse.
* generic/tclEvent.c (Tcl_Finalize): moved the tsdPtr
initialization inside the subsystemsInitialized check to prevent
it potentially getting called twice during finalization. (wu)
[Patch #403532, Bug #219391]
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | generic/tclCkalloc.c | 3 | ||||
-rw-r--r-- | generic/tclEvent.c | 5 |
3 files changed, 13 insertions, 3 deletions
@@ -1,5 +1,13 @@ 2001-03-30 Jeff Hobbs <jeffh@ActiveState.com> + * generic/tclCkalloc.c (TclFinalizeMemorySubsystem): set curTagPtr + to NULL to allow for reuse. + * generic/tclEvent.c (Tcl_Finalize): moved the tsdPtr + initialization inside the subsystemsInitialized check to prevent + it potentially getting called twice during finalization. (wu) + [Patch #403532, Bug #219391] + + * generic/tclThreadTest.c (Tcl_ThreadObjCmd): cast fixes * generic/tclTest.c (TestChannelCmd): added cast to mollify Windows debug build. diff --git a/generic/tclCkalloc.c b/generic/tclCkalloc.c index 4293a93..68e6336 100644 --- a/generic/tclCkalloc.c +++ b/generic/tclCkalloc.c @@ -13,7 +13,7 @@ * * This code contributed by Karl Lehenbauer and Mark Diekhans * - * RCS: @(#) $Id: tclCkalloc.c,v 1.10 2000/12/08 04:22:43 ericm Exp $ + * RCS: @(#) $Id: tclCkalloc.c,v 1.11 2001/03/31 07:57:31 hobbs Exp $ */ #include "tclInt.h" @@ -1219,6 +1219,7 @@ TclFinalizeMemorySubsystem() } if (curTagPtr != NULL) { TclpFree((char *) curTagPtr); + curTagPtr = NULL; } allocHead = NULL; Tcl_MutexUnlock(ckallocMutexPtr); diff --git a/generic/tclEvent.c b/generic/tclEvent.c index 2fff780..4aae424 100644 --- a/generic/tclEvent.c +++ b/generic/tclEvent.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEvent.c,v 1.10 2000/11/02 23:34:34 davidg Exp $ + * RCS: @(#) $Id: tclEvent.c,v 1.11 2001/03/31 07:57:31 hobbs Exp $ */ #include "tclInt.h" @@ -766,10 +766,11 @@ Tcl_Finalize() ThreadSpecificData *tsdPtr; TclpInitLock(); - tsdPtr = TCL_TSD_INIT(&dataKey); if (subsystemsInitialized != 0) { subsystemsInitialized = 0; + tsdPtr = TCL_TSD_INIT(&dataKey); + /* * Invoke exit handlers first. */ |