Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 0734ddfceaa416a4b62fb870457111a5c16ebbf8
Ticket: 419449ffffffffffffffffffffffffffffffffff
TclInExit returns wrong value.
User & Date: vincentdarley on 2001-04-27 11:05:28
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    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
      /*
    
  4. foundin changed to: "None"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "vincentdarley"
  9. subsystem changed to: "None"
  10. title changed to: "TclInExit returns wrong value."
  11. type changed to: "Bug"