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

Critical: Crash before main() on macOS 15.4 RC #21126

Open
s-ludwig opened this issue Mar 31, 2025 · 1 comment
Open

Critical: Crash before main() on macOS 15.4 RC #21126

s-ludwig opened this issue Mar 31, 2025 · 1 comment

Comments

@s-ludwig
Copy link
Member

In the latest upcoming macOS update, any D application currently crashes during runtime initialization. I'm struggling to get a proper stack trace, but it looks like a null pointer dereference in pthread_getspecific. The only usable stack trace that I could get from one binary was this:

  * frame #0: 0x00007ff8101628c1
    frame #1: 0x00000001027c52b2 aspect`_D2rt18sections_darwin_6411getTLSRangeFNbNixPvZAv(tlsSymbol="\U00000001") at sections_darwin_64.d:43:9
    frame #2: 0x00000001027c5956 aspect`_D2rt19sections_elf_shared3DSO8tlsRangeMxFNbNiZAv(this=<unavailable>) at sections_elf_shared.d:201:13
    frame #3: 0x00000001027c5e97 aspect`_d_dso_registry(arg="\U00000001") at sections_elf_shared.d:606:13
    frame #4: 0x00000001027bbcb3 aspect`_D2rt3dso12register_dsoFZv at dso.d:51:9
    frame #5: 0x00007ff80fdd75a2
    frame #6: 0x00007ff80fe08e9a
    frame #7: 0x00007ff80fe3745c
    frame #8: 0x00007ff80fe3485d
    frame #9: 0x00007ff80fe35db2
    frame #10: 0x00007ff80fe08a7c
    frame #11: 0x00007ff80fdd740a
    frame #12: 0x00007ff80fdddbdb
    frame #13: 0x00007ff80fdd777c
    frame #14: 0x00007ff80fddb1c9
    frame #15: 0x00007ff80fdd7825
    frame #16: 0x00007ff80fdf17cb
    frame #17: 0x00007ff80fdc3634
    frame #18: 0x00007ff80fdc281f
    frame #19: 0x00007ff80fdc24da
@p0nce
Copy link
Contributor

p0nce commented Apr 1, 2025

* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x101fa8d9530)
  * frame #0: 0x000000018ba04bf4 libsystem_pthread.dylib`pthread_getspecific + 4
    frame #1: 0x0000000100051754 main`_D2rt18sections_darwin_6411getTLSRangeFNbNixPvZAv + 188
    frame #2: 0x0000000100051f60 main`_d_dso_registry + 876
    frame #3: 0x000000018b686c18 dyld`invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 444
    frame #4: 0x000000018b6c30b4 dyld`invocation function for block in 
<snip>

To reproduce:

void main()
{
}

Any LDC compiler >= 1.30.
macOS 15.4 (not 15.3)

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

No branches or pull requests

2 participants