diff options
author | stanton <stanton> | 1998-12-01 05:01:01 (GMT) |
---|---|---|
committer | stanton <stanton> | 1998-12-01 05:01:01 (GMT) |
commit | e93d75d3f9c3d8584f674270fde377c0b90cfd8f (patch) | |
tree | fe6eed551aa4e0b1510edb2cf71cb5bceee5911a /generic/tclCkalloc.c | |
parent | 159c2988058c79f38a3d820dbb5cea3f8b5abc34 (diff) | |
download | tcl-e93d75d3f9c3d8584f674270fde377c0b90cfd8f.zip tcl-e93d75d3f9c3d8584f674270fde377c0b90cfd8f.tar.gz tcl-e93d75d3f9c3d8584f674270fde377c0b90cfd8f.tar.bz2 |
* unix/tclUnixNotfy.c (Tcl_WaitForEvent): Fixed hang that occurs
when trying to close a pipe that is currently being waited on by
the notifier thread. [Bug: 607]
* unix/tclUnixFCmd.c (GetPermissionsAttribute): Increase size of
returnString buffer to avoid overflow.
* generic/tclThreadTest.c (TclThreadSend): Fixed memory leak due
to use of TCL_VOLATILE instead of TCL_DYNAMIC.
* generic/tclThread.c (TclRememberSyncObject): Fixed memory leak
caused by failure to reuse condition variables.
* unix/tclUnixNotfy.c: (Tcl_AlertNotifier, Tcl_WaitForEvent,
NotifierThreadProc, Tcl_InitNotifier): Fixed race condition caused
by incorrect use of condition variables when sending messages
between threads.. [Bug: 607]
* generic/tclTestObj.c (TeststringobjCmd): MAX_STRINGS was off by one
so the strings array was too small.
* generic/tclCkalloc.c (Tcl_DbCkfree): Moved mutex lock so
ValidateMemory is done inside the mutex to avoid a race condition
when validate_memory is enabled. [Bug: 880]
Diffstat (limited to 'generic/tclCkalloc.c')
-rw-r--r-- | generic/tclCkalloc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclCkalloc.c b/generic/tclCkalloc.c index e498b6a..a51b52e 100644 --- a/generic/tclCkalloc.c +++ b/generic/tclCkalloc.c @@ -12,7 +12,7 @@ * * This code contributed by Karl Lehenbauer and Mark Diekhans * - * RCS: @(#) $Id: tclCkalloc.c,v 1.1.2.2 1998/09/24 23:58:41 stanton Exp $ + * RCS: @(#) $Id: tclCkalloc.c,v 1.1.2.3 1998/12/01 05:01:01 stanton Exp $ */ #include "tclInt.h" @@ -468,12 +468,12 @@ Tcl_DbCkfree(ptr, file, line) if (validate_memory) Tcl_ValidateAllMemory(file, line); + TclpMutexLock(&ckallocMutex); ValidateMemory(memp, file, line, TRUE); if (init_malloced_bodies) { memset((VOID *) ptr, GUARD_VALUE, (size_t) memp->length); } - TclpMutexLock(&ckallocMutex); total_frees++; current_malloc_packets--; current_bytes_malloced -= memp->length; |