Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2026-10-22
17:19 • Ticket [7393be0be6] Tcl Thread library doesn't work in Debug build on Window... artifact: 3c1c221a54 user: serhiy.storchaka
2026-10-21
10:03 • Closed ticket [7393be0be6]. artifact: 0ca47ecb27 user: serhiy.storchaka
2021-03-18
20:55 • Ticket [7393be0be6]: 4 changes artifact: 29127da551 user: jan.nijtmans
2016-06-14
10:14 • Ticket [7393be0be6]: 3 changes artifact: 72709f5850 user: jan.nijtmans
09:58
Fix [7393be0be6e7f91cbb2016fa777896e3895929e3|7393be0be6]: Tcl Thread library doesn't work in Debug ... check-in: 5aad54f649 user: jan.nijtmans tags: trunk
09:57
Fix [7393be0be6e7f91cbb2016fa777896e3895929e3|7393be0be6]: Tcl Thread library doesn't work in Debug ... check-in: 5ed3db2343 user: jan.nijtmans tags: core-8-6-branch
09:55
Fix [7393be0be6e7f91cbb2016fa777896e3895929e3|7393be0be6]: Tcl Thread library doesn't work in Debug ... check-in: 37a9ecdea2 user: jan.nijtmans tags: core-8-5-branch
2016-04-18
12:45 • New ticket [7393be0be6] Tcl Thread library doesn't work in Debug build on Wi... artifact: ede0639370 user: christian.nassau

Tcl Thread library doesn't work in Debug build on Windows_x64

Closed / Fixed7393be0be6e7f91cbb2016fa777896e3895929e3Created 11 years agoUpdated 42 days ago
Descriptionplain2016-04-18 12:45:34
There are two problems that prevent the Tcl Thread package from working in a Windows debug build:

1) the pkgIndex.tcl always loads the release-version of thread27.dll
there should be a check for tcl_platform(debug) and thread27g.dll should be loaded in the debug case

2) the thread initialisation in TclWinThreadStart (file win/tclWinThrd.c) uses an illegal combination of flags in the line
    _controlfp(winThreadPtr->fpControl, fpmask);
The flag "_MCW_PC" is not allowed on a 64-bit Windows system (see https://msdn.microsoft.com/en-us/library/e9b52ceh.aspx).
Using "_MCW_PC" triggers an assertion on Windows 8.1 that aborts the process.

On affected systems the assertion can be triggered using
   package require Thread
   thread::create -joinable { thread::wait }
Referenced by3
jan.nijtmansplain2016-06-14 10:14:51
Point 2) is now fixed in all open branches. So at least the non-debug version should be OK now on x64. Thanks!
jan.nijtmanswiki2021-03-18 20:55:14

Let me check, but I think this one can be closed

serhiy.storchakawiki2026-10-21 10:03:40

Point 2 was fixed in 8.6.6 by [5ed3db2343]: _MCW_PC is no longer passed to _controlfp() on Win64. Point 1 is also resolved: the Thread nmake build writes pkgIndex.tcl with the DLL name of the build being made, including the debug suffix.

serhiy.storchaka Ticket [7393be0be6]: 3 changes [History diff]2026-10-22 17:19:32
Log in (anonymous is fine) to add a comment.