diff options
author | dgp <dgp@users.sourceforge.net> | 2001-09-28 02:26:35 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2001-09-28 02:26:35 (GMT) |
commit | 0ad880e7db2ba6160f6b63636975b41b94c639e4 (patch) | |
tree | 2c24fb81e86ad1dc371ef65271c3f45bc62c209e | |
parent | 5eabea9a35028735405f71cb9a56e59414c2d511 (diff) | |
download | tcl-0ad880e7db2ba6160f6b63636975b41b94c639e4.zip tcl-0ad880e7db2ba6160f6b63636975b41b94c639e4.tar.gz tcl-0ad880e7db2ba6160f6b63636975b41b94c639e4.tar.bz2 |
* generic/tclIO.c (ChannelTimerProc): Added Tcl_Preserve()
and Tcl_Release() to fix segfault introduced by the 2001-09-26
changes. [Bug 465494]
* doc/TCL_MEM_DEBUG.3: Updated out-of-date reference to
#define GUARD_SIZE.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | doc/TCL_MEM_DEBUG.3 | 7 | ||||
-rw-r--r-- | generic/tclIO.c | 5 |
3 files changed, 16 insertions, 5 deletions
@@ -1,3 +1,12 @@ +2001-09-27 Don Porter <dgp@users.sourceforge.net> + + * generic/tclIO.c (ChannelTimerProc): Added Tcl_Preserve() + and Tcl_Release() to fix segfault introduced by the 2001-09-26 + changes. [Bug 465494] + + * doc/TCL_MEM_DEBUG.3: Updated out-of-date reference to + #define GUARD_SIZE. + 2001-09-26 Andreas Kupries <andreas_kupries@users.sourceforge.net> * The changes below fix [Bug #462317] where Expect tried to read diff --git a/doc/TCL_MEM_DEBUG.3 b/doc/TCL_MEM_DEBUG.3 index 6b1ec78..50445f6 100644 --- a/doc/TCL_MEM_DEBUG.3 +++ b/doc/TCL_MEM_DEBUG.3 @@ -3,7 +3,7 @@ '\" Copyright (c) 2000 by Scriptics Corporation. '\" All rights reserved. '\" -'\" RCS: @(#) $Id: TCL_MEM_DEBUG.3,v 1.2 2000/04/28 00:47:49 ericm Exp $ +'\" RCS: @(#) $Id: TCL_MEM_DEBUG.3,v 1.2.14.1 2001/09/28 02:26:35 dgp Exp $ '\" .so man.macros .TH TCL_MEM_DEBUG 3 8.1 Tcl "Tcl Library Procedures" @@ -40,8 +40,9 @@ When memory debugging is enabled, whenever a call to \fBckalloc\fR is made, slightly more memory than requested is allocated so the memory debugging code can keep track of the allocated memory, and eight-byte ``guard zones'' are placed in front of and behind the space that will be -returned to the caller. (The size of the guard zone is defined by the -C #define \fBGUARD_SIZE\fR in \fIbaseline/src/ckalloc.c\fR -- it can +returned to the caller. (The sizes of the guard zones are defined by the +C #define \fBLOW_GUARD_SIZE\fR and #define \fBHIGH_GUARD_SIZE\fR +in the file \fIgeneric/tclCkalloc.c\fR -- it can be extended if you suspect large overwrite problems, at some cost in performance.) A known pattern is written into the guard zones and, on a call to \fBckfree\fR, the guard zones of the space being freed are diff --git a/generic/tclIO.c b/generic/tclIO.c index dafc6af..5b00c3d 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.20.2.9 2001/09/27 02:26:42 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.20.2.10 2001/09/28 02:26:35 dgp Exp $ */ #include "tclInt.h" @@ -6311,10 +6311,11 @@ ChannelTimerProc(clientData) (Tcl_ChannelBlockModeProc(chanPtr->typePtr) == NULL)) { statePtr->flags |= CHANNEL_TIMER_FEV; } - + Tcl_Preserve(statePtr); Tcl_NotifyChannel((Tcl_Channel)chanPtr, TCL_READABLE); statePtr->flags &= ~CHANNEL_TIMER_FEV; + Tcl_Release(statePtr); } else { statePtr->timer = NULL; UpdateInterest(chanPtr); |