https://bugs.winehq.org/show_bug.cgi?id=54064
--- Comment #7 from François Gouget fgouget@codeweavers.com --- I found it strange that the crash would happen after test_tp_multi_wait() completes. But TpReleasePool() is asynchronous: it signals the threads to exit and returns immediately. So there may still be a lot of threads when test_tp_io() runs.
I don't know how many threads are needed in order for test_tp_multi_wait() to be meaningful. But maybe another approach would be to minimize their stack size with something like this: https://gitlab.winehq.org/wine/wine/-/merge_requests/2133