From: <no...@so...> - 2001-09-11 01:28:38
|
Bugs item #419449, was opened at 2001-04-27 04:05 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=110894&aid=419449&group_id=10894 Category: 02. Event Loops Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Vince Darley (vincentdarley) Assigned to: Jeffrey Hobbs (hobbs) Summary: TclInExit returns wrong value. Initial Comment: If TclInExit is called very late in the finalize sequence, the thread specific data has been freed already, and TclInExit returns the wrong value (and in fact re-initialises the thread specific data). The patch below fixes this problem. TclKit can, under some circumstances, run into this bug. $ diff -r -C3 tcl8.4/generic/tclEvent.c tcl8.4v/generic/tclEvent.c *** tcl8.4/generic/tclEvent.c Sat Mar 31 08:57:31 2001 --- tcl8.4v/generic/tclEvent.c Thu Feb 1 15:21:47 2001 *************** *** 935,942 **** int TclInExit() { ! ThreadSpecificData *tsdPtr = TCL_TSD_INIT (&dataKey); ! return tsdPtr->inExit; } ^L /* --- 935,946 ---- int TclInExit() { ! ThreadSpecificData *tsdPtr = TclThreadDataKeyGet (&dataKey); ! if (tsdPtr == NULL) { ! return inFinalize; ! } else { ! return tsdPtr->inExit; ! } } ^L /* ---------------------------------------------------------------------- >Comment By: Jeffrey Hobbs (hobbs) Date: 2001-09-10 18:28 Message: Logged In: YES user_id=72656 fixed in core-8-3-1-branch and 8.4a4cvs head. ---------------------------------------------------------------------- Comment By: Vince Darley (vincentdarley) Date: 2001-09-10 09:39 Message: Logged In: YES user_id=32170 Ok, a patch is attached. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2001-04-27 17:34 Message: Logged In: YES user_id=80530 Can you attach the patch, rather than include it in the comment? ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=110894&aid=419449&group_id=10894 |