-
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
Avoid injecting sanitizer runtimes into staticlibs (#64629). #65497
Conversation
r? @davidtwco (rust_highfive has picked a reviewer for you, use r? to override) |
Also Cc @tmiasko and @nikomatsakis for additional eyes :) |
@bors rollup=never |
It seems fine to me, but I don't claim a deep understanding of what's going on =) |
✌️ @tmiasko can now approve this pull request |
I don't think that this implies any changes to the content in rust-lang/rustc-dev-guide#466, right? |
@bors r+ |
📌 Commit a2feb9c has been approved by |
Avoid injecting sanitizer runtimes into staticlibs (#64629). This fixes the remaining issue in `creader.rs` and also fixes the expected test failure. I have explicitly turned the `$(CC)` call into a negative check with the `!` to ensure that this command is really failing (if it is not, then either the runtime is attached to the lib or the lib has not been instrumented and both would be an error). I've also borrowed `program.rs` and the additional `rustc` invocation from @tmiasko 's PR since he pointed out that using `-fsanitize=address` with `$(CC)` for linking could fail if the sanitizer runtimes on the system are incompatible. With this toolchain I was able to compile Firefox locally without any linker errors. I am still seeing races with Rust in TSan but I assume that is because I did not build with `-Z build-std`.
☀️ Test successful - checks-azure |
This fixes the remaining issue in
creader.rs
and also fixes the expected test failure. I have explicitly turned the$(CC)
call into a negative check with the!
to ensure that this command is really failing (if it is not, then either the runtime is attached to the lib or the lib has not been instrumented and both would be an error).I've also borrowed
program.rs
and the additionalrustc
invocation from @tmiasko 's PR since he pointed out that using-fsanitize=address
with$(CC)
for linking could fail if the sanitizer runtimes on the system are incompatible.With this toolchain I was able to compile Firefox locally without any linker errors. I am still seeing races with Rust in TSan but I assume that is because I did not build with
-Z build-std
.