Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2026-10-12
19:27 • Pending ticket [e50d66e6c3]: Crash on exit after loading dll built by mingw g++<... artifact: 7e5a432e4a user: serhiy.storchaka
2017-02-16
11:54 • New ticket [e50d66e6c3]. artifact: 87a2d98774 user: jal_frezie

Crash on exit after loading dll built by mingw g++

Pendinge50d66e6c34b79a7f896a8458f01d9b705367ad7Created 10 years agoUpdated 51 days ago
Descriptionplain2017-02-16 11:54:11
32-bit Windows: if I load a .dll that has been built with MinGW g++ (4.9.1 and 5.3 tested), it works as expected but during exit from Tcl a crash occurs: "This application has requested the Runtime to terminate it in an unusual way". This happens even if Tcl fails to find an Init procedure in the loaded .dll, and even if the .dll is itself built with gcc but loads another .dll built with g++. Tested with Tcl 8.6.6 built with MinGW gcc 4.91 and Microsoft Visual c++ 2015, and also with ActiveState's Tcl 8.6.4
serhiy.storchakawiki2026-10-12 19:27:52

I cannot reproduce it on 64-bit Windows 11: a DLL built with MinGW g++ (with a static C++ object) loads into 8.6.18 and 9.1 tclsh and exits cleanly, also with TCL_FINALIZE_ON_EXIT=1 and when the Init function is not found. I could not test a 32-bit build. Does it still happen with a current 32-bit MinGW?

Log in (anonymous is fine) to add a comment.