digitalmars.D.bugs - [Issue 13426] New: crash when using exceptions in a non-d thread (in
- via Digitalmars-d-bugs (46/47) Sep 05 2014 https://issues.dlang.org/show_bug.cgi?id=13426
https://issues.dlang.org/show_bug.cgi?id=13426 Issue ID: 13426 Summary: crash when using exceptions in a non-d thread (in thread_stackBottom) Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1 Component: DMD Assignee: nobody puremagic.com Reporter: blastrock free.fr Created attachment 1418 --> https://issues.dlang.org/attachment.cgi?id=1418&action=edit minimal example that crashes Hi, When a thread is created from C++ (or probably any other language) and this thread calls back to a D function which deals with exceptions (even if they are properly caught), the program will crash. Here is the stack: (*())()>::_M_invoke<>(std::_Index_tuple<>) (this=0x647708) at /usr/include/c++/4.9/functional:1700 (this=0x647708) at /usr/include/c++/4.9/functional:1688::_M_run() (this=0x6476f0) at /usr/include/c++/4.9/thread:115 pthread_create.c:309 ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 I attached a minimal example. Just run build_and_gdb.sh which will compile the c++ library, the d program and start gdb on it. --
Sep 05 2014