-
Notifications
You must be signed in to change notification settings - Fork 1
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
lldbdplugin crashes for certain D symbols #2
Comments
I suspect Runtime.initialize is called from another thread. You'll need to ensure thread_attachThis() has been called on the thread calling GC.malloc. |
no, even when i make sure But indeed issue is to to fact that upon calling this, seems like it's calling from another thread in lldb and that causes issues
now getting:
when i add:
/cc @rainers |
Not sure how well D shared libraries work on OSX to begin with. I'm just guessing wildly, but
|
I also tried with ldc2 and facing same bug; ldc2 should support shared libraries on OSX
made sure it is
I also tried with:
but same bug |
depending on how i set things up i can also get:
( + other threads managed by lldb) |
EDIT: I fixed this issue by patching |
fixed in a1bd6e9 but not sure what caused this bug or if there was another way to fix it the modification to
since lldb seems to call the plugin a large number of times when |
DMD does not support dynamic libraries on macOS but LDC does.
The runtime has a guard for that. |
see my comment above:
note that a1bd6e9 |
for https://github.com/timotheecour/dtools/blob/master/dtools/lldbdplugin.d:
not sure why i get this crash:
workaround: avoid the reallocations with for example:
enum L_max=1_000_000;
of course, this only hides the underlying issue and doesn't completely remove the problem
NOTE
I couldn't reproduce without using lldb to call into the shared library lldbdplugin (ie, if I call the shared library directly, it doesn't crash)
NOTE
auto status = thread_suspend( t.m_tmach );
gives status:268435459 which is invalid value of kern_return_t enum
The text was updated successfully, but these errors were encountered: