Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash when using exceptions in a non-d thread (in thread_stackBottom) #18878

Open
dlangBugzillaToGithub opened this issue Sep 5, 2014 · 0 comments
Labels

Comments

@dlangBugzillaToGithub
Copy link

Philippe reported this on 2014-09-05T20:28:36Z

Transferred from https://issues.dlang.org/show_bug.cgi?id=13426

Description

Created attachment 1418
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:
#0  0x000000000041f469 in thread_stackBottom ()
#1  0x000000000041ee5a in core.runtime.defaultTraceHandler() ()
#2  0x000000000041ee01 in core.runtime.defaultTraceHandler() ()
#3  0x000000000041e6a1 in _d_traceContext ()
#4  0x000000000041bf78 in _d_createTrace ()
#5  0x0000000000417872 in _d_throwc ()
#6  0x000000000041746d in test.throwit() () at test.d:15
#7  0x00000000004173fe in callback() () at test.d:6
#8  0x00007ffff7bd956d in std::_Bind_simple<void (*())()>::_M_invoke<>(std::_Index_tuple<>) (this=0x647708) at /usr/include/c++/4.9/functional:1700
#9  0x00007ffff7bd94b5 in std::_Bind_simple<void (*())()>::operator()() (this=0x647708)
    at /usr/include/c++/4.9/functional:1688
#10 0x00007ffff7bd9432 in std::thread::_Impl<std::_Bind_simple<void (*())()> >::_M_run() (
    this=0x6476f0) at /usr/include/c++/4.9/thread:115
#11 0x00007ffff6eac8a0 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#12 0x00007ffff77b30a4 in start_thread (arg=0x7ffff6bdf700) at pthread_create.c:309
#13 0x00007ffff71e7c2d in clone () at ../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.

!!!There are attachements in the bugzilla issue that have not been copied over!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant