-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Rollup of 6 pull requests #133377
Rollup of 6 pull requests #133377
Conversation
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.
For the code pattern reported in <rust-lang#133272>, ```rs impl Foo { fn fun() { let S { ref Self } = todo!(); } } ``` <rust-lang#121208> converted this to a `span_bug` from a `span_delayed_bug` because this specific self-ctor code pattern lacked test coverage. It turns out this can be hit but we just lacked test coverage, so change it back to a `span_delayed_bug` and add a target tested case.
…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)
…olnay use `confstr(_CS_DARWIN_USER_TEMP_DIR, ...)` as a `TMPDIR` fallback on Darwin Rebased version of rust-lang#100824, FCP has completed there. Motivation from rust-lang#100824 (comment): > This is a behavioral change in an edge case on Darwin platforms (macOS, iOS, ...). > > Specifically, this changes it so that iff `TMPDIR` is unset in the environment, then we use `confstr(_CS_DARWIN_USER_TEMP_DIR, ...)` to query the user temporary directory (previously we just returned `"/tmp"`). If this fails (probably possible in a sandboxed program), only then do we fallback to `"/tmp"` (as before). > > The motivations here are two-fold: > > 1. This is better for security, and is in line with the [platform security recommendations](https://developer.apple.com/library/archive/documentation/Security/Conceptual/SecureCodingGuide/Articles/RaceConditions.html#//apple_ref/doc/uid/TP40002585-SW10), as it is unavailable to other users (although it is the same value as seen by all other processes run by the same user). > 2. This is a more consistent fallback for when `getenv("TMPDIR")` is unavailable, as `$TMPDIR` is usually initialized to the `DARWIN_USER_TEMP_DIR`. > > It seems quite unlikely that anybody will break because of this, and I think it falls under the carve-out we have for platform specific behavior: https://doc.rust-lang.org/nightly/std/io/index.html#platform-specific-behavior. Closes rust-lang#99608. Closes rust-lang#100824. ``@rustbot`` label O-apple T-libs-api r? Dylan-DPC
… r=fmease Add specific diagnostic for using macro_rules macro as attribute/derive Fixes rust-lang#132928
…-errors Re-delay a resolve `bug` related to `Self`-ctor in patterns For the code pattern reported in <rust-lang#133272>, ```rs impl Foo { fn fun() { let S { ref Self } = todo!(); } } ``` <rust-lang#121208> converted this to a `span_bug` from a `span_delayed_bug` because this specific self-ctor code pattern lacked test coverage. It turns out this can be hit but we just lacked test coverage, so change it back to a `span_delayed_bug` and add a targeted test case. Follow-up to rust-lang#121208, cc ``@nnethercote`` (very good exercise to expose our test coverage gaps). Fixes rust-lang#133272.
…e, r=jhpratt Mark `<[T; N]>::as_mut_slice` with the `const` specifier. Tracking issue: rust-lang#133333 `<[T; N]>::as_mut_slice` can have the `const` specifier without any changes to the function body.
…dtolnay Remove unnecessary bool from `ExpectedFound::new` It's true almost everywhere, and the one place it's not can be replaced w/ an if statement.
@bors r+ rollup=never p=5 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: ff1737bb00 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (826b673): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary 2.1%, secondary 2.3%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 797.765s -> 795.832s (-0.24%) |
Successful merges:
confstr(_CS_DARWIN_USER_TEMP_DIR, ...)
as aTMPDIR
fallback on Darwin #131505 (useconfstr(_CS_DARWIN_USER_TEMP_DIR, ...)
as aTMPDIR
fallback on Darwin)bug
related toSelf
-ctor in patterns #133286 (Re-delay a resolvebug
related toSelf
-ctor in patterns)<[T; N]>::as_mut_slice
with theconst
specifier. #133332 (Mark<[T; N]>::as_mut_slice
with theconst
specifier.)ExpectedFound::new
#133366 (Remove unnecessary bool fromExpectedFound::new
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup