-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Place TLS initializers with relocations in .tdata #70720
Conversation
I'll try to pull this and build and test locally. If you're developing on a Mac, you could also just try building |
OK, I built your patch locally, and with it, |
I'd assume #![feature(thread_local)]
#[thread_local]
static A: &u8 = &42;
fn main() {
dbg!(*A);
} would be a minimal repro, unsure how to test this without a mac though. The PR looks fine to me, so @bors r+ |
📌 Commit fffbcc8 has been approved by |
@oli-obk Right you are! Tested your proposed repro locally, and it both crashes the current compiler and also doesn't crash with this PR applied. |
Superb! Thanks for checking @ecstatic-morse if you get around to it before this PR goes to bors, please add the repro to the test suite, if not let's keep the issue open as |
Added the regression test. @bors r=oli-obk |
📌 Commit f030635 has been approved by |
Rollup of 9 pull requests Successful merges: - rust-lang#69860 (Use associated numeric consts in documentation) - rust-lang#70576 (Update the description of the ticket to point at RFC 1721) - rust-lang#70597 (Fix double-free and undefined behaviour in libstd::syn::unix::Thread::new) - rust-lang#70640 (Hide `task_context` when lowering body) - rust-lang#70641 (Remove duplicated code in trait selection) - rust-lang#70707 (Remove unused graphviz emitter) - rust-lang#70720 (Place TLS initializers with relocations in .tdata) - rust-lang#70735 (Clean up E0502 explanation) - rust-lang#70741 (Add test for rust-lang#59023) Failed merges: r? @ghost
Should fix #70673, although I'm not sure how to test this. Perhaps @joshlf could find a MCVE?
Also adds more context to the FIXME.
r? @oli-obk