https://issues.dlang.org/show_bug.cgi?id=19314
--- Comment #1 from [email protected] --- Commit pushed to master at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/f60eb358ccbc14a1a5fc1774eab505ed0132e999 Fix crash in destructor of detached thread Fix issue 19314 Expectation is that after thread is detached from druntime, it becomes responsibility of external environment to terminate it properly (for example, by calling `join` from C/C++ code). However, `Thread` object for that thread will still remain and will eventually be collected by GC. Destructor tries to call `pthread_detach` unconditionally but it is undefined behaviour if thread was already joined before (see `man pthread_detach`). --
