Overview
| Artifact ID: | 1594dbfb955eba1f46e5d0bdf8aa45a4392c2c74 |
|---|---|
| Ticket: | 651139ffffffffffffffffffffffffffffffffff
logic error in tclThread.c |
| User & Date: | nobody on 2002-12-09 22:27:55 |
Changes
- assignee changed to: "andreas_kupries"
- cmimetype changed to: "text/plain"
- 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
- foundin changed to: "obsolete: 8.4.1"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "49. Threading"
- title changed to: "logic error in tclThread.c"
- type changed to: "Bug"