-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
SIGSEGV when using non-trivial thread_local! with -C target-cpu=haswell on macOS #46355
Comments
Seems to be macOS-specific, can't reproduce this on Linux. |
I can repro on my Mac. Early 2015 Macbook Pro, running macOS Sierra.
It did not crash on my 1.18.0 install; first starts crashing on
|
triage: P-medium Seems likely to be an LLVM bug. If more data or dups turn up, we can re-evaluate. |
I am experiencing something similar to this when compiling native on OSX.
OSX
[Edit] problem does not exists in nightly v 1.24. So perhaps a regression in LLVM 6.0?
|
…xcrichton Do not allow LLVM to increase a TLS's alignment on macOS. This addresses the various TLS segfault on macOS 10.10. Fix rust-lang#51794. Fix rust-lang#51758. Fix rust-lang#50867. Fix rust-lang#48866. Fix rust-lang#46355. Fix rust-lang#44056.
Here's a code sample, narrowed down a bit from my program:
When built with
RUSTFLAGS="-C target-cpu=native" cargo build --release
and run, it gets SIGSEGV on my Mac. (I poked around a little bit with lldb and it looks liketlv_get_addr
is returning something we can't dereference. I couldn't investigate thoroughly because it wasn't showing source line information for whatever reason.) Without theRUSTFLAGS
, it doesn't segfault.Here's an lldb session with some basic information about the crash:
I'm on macOS 10.12.6. target-cpu=native on my machine seems to mean haswell, according to
rustc --print target-cpus
.The text was updated successfully, but these errors were encountered: