-
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
Allow disabling ASan instrumentation for globals #127483
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @cuviper (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
Some changes occurred in tests/codegen/sanitizer cc @rust-lang/project-exploit-mitigations, @rcvalle |
This comment has been minimized.
This comment has been minimized.
b378189
to
ce4a226
Compare
LGTM (@cuviper FYI). We'll want this for #123617. Thank you for your time and for working on this, @BertalanD! Much appreciated. |
ce4a226
to
840429f
Compare
@BertalanD do you know if there is anything else possibly missing instrumentation before #123617? |
Thank you for reviewing; I pushed up the suggested style change. I haven't looked into missing instrumentation, so I can't help with that. But what might be relevant for stabilization is that this came up in the context of a Chromium issue where the added ASan annotation on |
Thank you for the information and for sending it out, @BertalanD! I'll take a look. |
The operation of all three basically boils down to creating a special section in the output file that's an array of pointers, by creating |
☔ The latest upstream changes (presumably #127831) made this pull request unmergeable. Please resolve the merge conflicts. |
840429f
to
9d17424
Compare
670c03e
to
9447dc7
Compare
This comment has been minimized.
This comment has been minimized.
@BertalanD if you can address the CI failure we can push this forward :) thanks |
AddressSanitizer adds instrumentation to global variables unless the [`no_sanitize_address`](https://llvm.org/docs/LangRef.html#global-attributes) attribute is set on them. This commit extends the existing `#[no_sanitize(address)]` attribute to set this; previously it only had the desired effect on functions.
9447dc7
to
204b228
Compare
@bors r+ |
@bors ping |
@bors r=rcvalle |
…r=rcvalle Allow disabling ASan instrumentation for globals AddressSanitizer adds instrumentation to global variables unless the [`no_sanitize_address`](https://llvm.org/docs/LangRef.html#global-attributes) attribute is set on them. This commit extends the existing `#[no_sanitize(address)]` attribute to set this; previously it only had the desired effect on functions. (cc rust-lang#39699)
…r=rcvalle Allow disabling ASan instrumentation for globals AddressSanitizer adds instrumentation to global variables unless the [`no_sanitize_address`](https://llvm.org/docs/LangRef.html#global-attributes) attribute is set on them. This commit extends the existing `#[no_sanitize(address)]` attribute to set this; previously it only had the desired effect on functions. (cc rust-lang#39699)
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#127483 (Allow disabling ASan instrumentation for globals) - rust-lang#131505 (use `confstr(_CS_DARWIN_USER_TEMP_DIR, ...)` as a `TMPDIR` fallback on Darwin) - rust-lang#132949 (Add specific diagnostic for using macro_rules macro as attribute/derive) - rust-lang#133247 (Reduce integer `Display` implementation size) - rust-lang#133286 (Re-delay a resolve `bug` related to `Self`-ctor in patterns) - rust-lang#133332 (Mark `<[T; N]>::as_mut_slice` with the `const` specifier.) - rust-lang#133366 (Remove unnecessary bool from `ExpectedFound::new`) Failed merges: - rust-lang#131859 (Update TRPL to add new Chapter 17: Async and Await) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 6 pull requests Successful merges: - rust-lang#127483 (Allow disabling ASan instrumentation for globals) - rust-lang#131505 (use `confstr(_CS_DARWIN_USER_TEMP_DIR, ...)` as a `TMPDIR` fallback on Darwin) - rust-lang#132949 (Add specific diagnostic for using macro_rules macro as attribute/derive) - rust-lang#133286 (Re-delay a resolve `bug` related to `Self`-ctor in patterns) - rust-lang#133332 (Mark `<[T; N]>::as_mut_slice` with the `const` specifier.) - rust-lang#133366 (Remove unnecessary bool from `ExpectedFound::new`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#127483 - BertalanD:no_sanitize-global-var, r=rcvalle Allow disabling ASan instrumentation for globals AddressSanitizer adds instrumentation to global variables unless the [`no_sanitize_address`](https://llvm.org/docs/LangRef.html#global-attributes) attribute is set on them. This commit extends the existing `#[no_sanitize(address)]` attribute to set this; previously it only had the desired effect on functions. (cc rust-lang#39699)
AddressSanitizer adds instrumentation to global variables unless the
no_sanitize_address
attribute is set on them.This commit extends the existing
#[no_sanitize(address)]
attribute to set this; previously it only had the desired effect on functions.(cc #39699)