Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 1594dbfb955eba1f46e5d0bdf8aa45a4392c2c74
Ticket: 651139ffffffffffffffffffffffffffffffffff
logic error in tclThread.c
User & Date: nobody on 2002-12-09 22:27:55
Changes

  1. assignee changed to: "andreas_kupries"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    While trying to get setup to duplicate that other 
    bug (#649209), I discovered a severe logic error in 
    the TclFinalizeThreadData function.  This bug is 
    somewhat specific to Windows and definitely 
    specific to non-threaded builds.  This is the kind 
    of bug that could potentially be responsible for 
    more than one open bug.
    
    TclpMasterLock is called unconditionally on 
    tclThread.c:409, however the accompanying 
    TclpMasterUnlock is only called if TCL_THREADS is 
    defined.  Of course, this is totally fatal to the 
    process, because once the critical section has been 
    acquired by one thread, it is forever orphaned and 
    according to the Win32 API docs, the results of a 
    thread dying while holding a critical section 
    are "undefined".  Additionally, TclpMasterUnlock is 
    not defined when TCL_THREADS is not defined.  It 
    should always be declared, regardless of the 
    TCL_THREADS define.  
    
    Fortunately, a cursory search of the Tcl source code 
    turned up no other instances of this particular logic 
    error.
    
    I can create a patch for this bug if you want, but it 
    would involve some work, since my local Tcl 
    source is not quite in sync with CVS.
    
    JJM
    
    
  4. foundin changed to: "obsolete: 8.4.1"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "49. Threading"
  10. title changed to: "logic error in tclThread.c"
  11. type changed to: "Bug"