Skip to content

Rollup of 8 pull requests #143105

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

Closed

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Jun 27, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

bjorn3 and others added 30 commits June 24, 2025 19:44
rustc_std_internal_symbol is meant to call functions from crates where
there is no direct dependency on said crate. As they either have to be
added to symbols.o or rustc has to introduce an implicit dependency on
them to avoid linker errors. The latter is done for some things like the
panic runtime, but adding these symbols to symbols.o allows removing
those implicit dependencies.
This used to be necessary for a correct linker order, but ever since the
introduction of symbols.o adding the symbols in question to symbols.o
would work just as well. We do still add dependencies on the panic runtime
to the local crate, but not for #![needs_panic_runtime] crates.

This also removes the runtime-depends-on-needs-runtime test.
inject_dependency_if used to emit this error, but with symbols.o it is
no longer important that there is no dependency and in fact it may be
nice to have panic_abort and panic_unwind directly depend on libstd in
the future for calling std::process::abort().
You shouldn't ever need to explicitly depend on it. And we weren't
checking that the panic runtime used the correct panic strategy either.
There is already panic-unwind to enable it.
mostly for #[non_exhaustive]
…t ok)

Normally a `run-fail` ui test shall not be terminated by a signal like
`SIGABRT`. So begin having that as a hard requirement.

Some of our current tests do terminate by a signal however. Introduce
and use `run-crash` for those tests.
…=fee1-dead

New const traits syntax

This PR only affects the AST and doesn't actually change anything semantically.

All occurrences of `~const` outside of libcore have been replaced by `[const]`. Within libcore we have to wait for rustfmt to be bumped in the bootstrap compiler. This will happen "automatically" (when rustfmt is run) during the bootstrap bump, as rustfmt converts `~const` into `[const]`. After this we can remove the `~const` support from the parser

Caveat discovered during impl: there is no legacy bare trait object recovery for `[const] Trait` as that snippet in type position goes down the slice /array parsing code and will error

r? `@fee1-dead`

cc `@nikomatsakis` `@traviscross` `@compiler-errors`
…trochenkov

Reduce special casing for the panic runtime

See the individual commits for more info.
Skip unnecessary components in x64 try builds

We unnecessarily rebuild `wasm-component-ld`, `llvm-bitcode-linker` and Cranelift during the intermediate PGO builds several times times, which is unnecessarily and increases the duration of try builds. This PR also disables some unnecessary dist components.

r? `@jieyouxu`
…crum

Update stage0 to 1.89.0-beta.1

- Update version placeholders
- Update stage0 to 1.89.0-beta.1
- Update `STAGE0_MISSING_TARGETS`
- Update `cfg(bootstrap)`

r? ``@Mark-Simulacrum``
…e-enum-v-142599, r=GuillaumeGomez

rustdoc: show attributes on enum variants

mostly for #[non_exhaustive]

unsure if there's any attributes we should take care to *not* include, it could use `render_code_attribute` and `is_non_exhaustive` instead, if that is a concern.

fixes rust-lang#142599
…signal, r=petrochenkov

tests: Require `run-fail` ui tests to have an exit code (`SIGABRT` not ok)

Normally a `run-fail` ui test shall not be terminated by a signal like `SIGABRT`. So begin having that as a hard requirement.

Some of our current tests do terminate by a signal however. Introduce and use ~`run-fail-without-exit-code`~ `run-crash` for those tests.

This adds further (cc rust-lang#142304, rust-lang#142886) protection against the regression in rust-lang#123733 since that bug also manifested as `SIGABRT` in `tests/ui/panics/panic-main.rs` (shown as `Aborted (core dumped)` in the logs attached to that issue, and I have also been able to reproduce this locally).

### TODO
- [x] **Q:** what about on Windows?
    **A:** we'll treat any exit code outside of 1 - 127 as "crashed", and we'll do the same on unix.
- [x] test all permutations of actual vs expected
    **Done:** See rust-lang#143002 (comment).

### Zulip discussion

See https://rust-lang.zulipchat.com/#narrow/channel/122651-general/topic/compiletest.3A.20terminate.20by.20signal.20vs.20exit.20with.20error/with/525611235
… r=oli-obk

const checks for lifetime-extended temporaries: avoid 'top-level scope' terminology

This error recently got changed in rust-lang#140942 to use the terminology of "top-level scope", but after further discussion in rust-lang/reference#1865 it seems the reference will not be using that terminology after all. So let's also remove it from the compiler again, and let's focus on what actually happens with these temporaries: their lifetime is extended until the end of the program.

r? `@oli-obk` `@traviscross`
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool O-android Operating system: Android O-linux Operating system: Linux S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-release Relevant to the release subteam, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels Jun 27, 2025
@compiler-errors
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Jun 27, 2025

📌 Commit 900341f has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 27, 2025
@bors
Copy link
Collaborator

bors commented Jun 27, 2025

⌛ Testing commit 900341f with merge b69da27...

bors added a commit that referenced this pull request Jun 27, 2025
…rors

Rollup of 8 pull requests

Successful merges:

 - #139858 (New const traits syntax)
 - #140809 (Reduce special casing for the panic runtime)
 - #142963 (Skip unnecessary components in x64 try builds)
 - #142974 (Update stage0 to 1.89.0-beta.1)
 - #142987 (rustdoc: show attributes on enum variants)
 - #143002 (tests: Require `run-fail` ui tests to have an exit code (`SIGABRT` not ok))
 - #143092 (const checks for lifetime-extended temporaries: avoid 'top-level scope' terminology)
 - #143096 (tag_for_variant: properly pass TypingEnv)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job aarch64-apple failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
failures:

---- [ui] tests/ui/sanitizer/address.rs stdout ----

error: test did not exit with failure! code=None
status: signal: 6 (SIGABRT)
command: cd "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/sanitizer/address" && RUSTC="/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2/bin/rustc" RUST_TEST_THREADS="3" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/sanitizer/address/a"
stdout: none
--- stderr -------------------------------
=================================================================
==299==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x00016d889450 at pc 0x000102577b08 bp 0x00016d8893f0 sp 0x00016d8893e8
READ of size 4 at 0x00016d889450 thread T0
    #0 0x000102577b04 in address::main::hf6afa4139605e527 address.rs:17
    #1 0x0001025779e4 in std::sys::backtrace::__rust_begin_short_backtrace::he245e2008e63f32a backtrace.rs:152
    #2 0x0001025779c4 in std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::h4fa00a831e1e773b rt.rs:206
    #3 0x00010417a224 in std::rt::lang_start_internal::h6eca7cfef2d1cdc4+0x53c (libstd-fd99cb7cdde5a0fc.dylib:arm64+0x1e224)
    #4 0x000102577bd0 in main+0xc4 (a:arm64+0x100003bd0)
    #5 0x00018362f150  (<unknown module>)
    #6 0x4d73fffffffffffc  (<unknown module>)

Address 0x00016d889450 is located in stack of thread T0 at offset 80 in frame
    #0 0x000102577a38 in address::main::hf6afa4139605e527 address.rs:13

  This frame has 2 object(s):
    [32, 40) ''
    [64, 80) 'xs' (line 14) <== Memory access at offset 80 overflows this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
      (longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-overflow address.rs:17 in address::main::hf6afa4139605e527
Shadow bytes around the buggy address:
  0x00016d889180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00016d889200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00016d889280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00016d889300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00016d889380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x00016d889400: f1 f1 f1 f1 f8 f2 f2 f2 00 00[f3]f3 00 00 00 00
  0x00016d889480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00016d889500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00016d889580: f1 f1 f1 f1 00 f3 f3 f3 00 00 00 00 00 00 00 00
  0x00016d889600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00016d889680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==299==ABORTING
------------------------------------------


---- [ui] tests/ui/sanitizer/badfree.rs stdout ----

error: test did not exit with failure! code=None
status: signal: 6 (SIGABRT)
command: cd "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/sanitizer/badfree" && RUSTC="/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2/bin/rustc" RUST_TEST_THREADS="3" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/sanitizer/badfree/a"
stdout: none
--- stderr -------------------------------
AddressSanitizer:DEADLYSIGNAL
=================================================================
==248==ERROR: AddressSanitizer: SEGV on unknown address 0xfffffffffffffff1 (pc 0x0001029e8730 bp 0x00016dc2cc40 sp 0x00016dc2cc00 T0)
==248==The signal is caused by a READ memory access.
    #0 0x0001029e8730 in __asan::Allocator::Deallocate(void*, unsigned long, unsigned long, __sanitizer::BufferedStackTrace*, __asan::AllocType) asan_allocator.cpp:733
    #1 0x000102a36a14 in free sanitizer_malloc_mac.inc:144
    #2 0x0001021d3b64 in std::sys::backtrace::__rust_begin_short_backtrace::hf9a801b60d922396+0x8 (a:arm64+0x100003b64)
    #3 0x0001021d3b44 in std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::h381d984be9053e34+0x24 (a:arm64+0x100003b44)
    #4 0x000103dd6224 in std::rt::lang_start_internal::h6eca7cfef2d1cdc4+0x53c (libstd-fd99cb7cdde5a0fc.dylib:arm64+0x1e224)
    #5 0x0001021d3c78 in main+0xc4 (a:arm64+0x100003c78)
    #6 0x00018362f150  (<unknown module>)
    #7 0x6e067ffffffffffc  (<unknown module>)

==248==Register values:
 x[0] = 0x0000000000000000   x[1] = 0x0000000000000001   x[2] = 0x0000000000000000   x[3] = 0x0000000000000000  
 x[4] = 0x000000016dc2cc50   x[5] = 0x0000000000000001   x[6] = 0x000000016d434000   x[7] = 0x0000000000000001  
 x[8] = 0x0000000000000002   x[9] = 0x0000000000000003  x[10] = 0x0000000000000007  x[11] = 0x0000000000000000  
x[12] = 0x000000002db85a9c  x[13] = 0x0000000000000000  x[14] = 0x0000000000000000  x[15] = 0x0000000000008000  
x[16] = 0x0000000102a4965c  x[17] = 0x00000001f5f1b9b8  x[18] = 0x0000000000000000  x[19] = 0x000000016dc2cc50  
x[20] = 0x0000000000000001  x[21] = 0xfffffffffffffff1  x[22] = 0x0000000102a94180  x[23] = 0x0000000000000000  
x[24] = 0x0000000000000000  x[25] = 0x0000000000000001  x[26] = 0x0000000000000001  x[27] = 0x000000006e69616d  
x[28] = 0x0000000104621000     fp = 0x000000016dc2cc40     lr = 0x00000001029e86fc     sp = 0x000000016dc2cc00  
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV asan_allocator.cpp:733 in __asan::Allocator::Deallocate(void*, unsigned long, unsigned long, __sanitizer::BufferedStackTrace*, __asan::AllocType)
==248==ABORTING
------------------------------------------


---- [ui] tests/ui/sanitizer/new-llvm-pass-manager-thin-lto.rs#opt0 stdout ----

error in revision `opt0`: test did not exit with failure! code=None
status: signal: 6 (SIGABRT)
command: cd "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/sanitizer/new-llvm-pass-manager-thin-lto.opt0" && RUSTC="/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2/bin/rustc" RUST_TEST_THREADS="3" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/sanitizer/new-llvm-pass-manager-thin-lto.opt0/a"
stdout: none
--- stderr -------------------------------
=================================================================
==565==ERROR: AddressSanitizer: stack-use-after-scope on address 0x00016b5e0f60 at pc 0x0001048295fc bp 0x00016b5e0ef0 sp 0x00016b5e0ee8
WRITE of size 8 at 0x00016b5e0f60 thread T0
    #0 0x0001048295f8 in core::ptr::write_volatile::h0298c1801322edf4+0x6c (a:arm64+0x10000d5f8)
    #1 0x000104829b10 in new_llvm_pass_manager_thin_lto::main::h36cf764fd0e6dc59+0x180 (a:arm64+0x10000db10)
    #2 0x000104829530 in core::ops::function::FnOnce::call_once::h16b930ba83a51fee+0xc (a:arm64+0x10000d530)
    #3 0x0001048294c4 in std::sys::backtrace::__rust_begin_short_backtrace::h7621c4732034532b+0x8 (a:arm64+0x10000d4c4)
    #4 0x0001048294a4 in std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::h5052f97da0d1bc1f+0x44 (a:arm64+0x10000d4a4)
    #5 0x0001048692e0 in std::rt::lang_start_internal::h6eca7cfef2d1cdc4+0xb24 (a:arm64+0x10004d2e0)
    #6 0x0001048293e0 in std::rt::lang_start::hb2c6fb9d10d29192+0x12c (a:arm64+0x10000d3e0)
    #7 0x000104829ba8 in main+0x20 (a:arm64+0x10000dba8)
    #8 0x00018362f150  (<unknown module>)
    #9 0x500bfffffffffffc  (<unknown module>)

Address 0x00016b5e0f60 is located in stack of thread T0 at offset 32 in frame
    #0 0x00010482999c in new_llvm_pass_manager_thin_lto::main::h36cf764fd0e6dc59+0xc (a:arm64+0x10000d99c)

  This frame has 1 object(s):
    [32, 40) 'x' <== Memory access at offset 32 is inside this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
      (longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-use-after-scope (a:arm64+0x10000d5f8) in core::ptr::write_volatile::h0298c1801322edf4+0x6c
Shadow bytes around the buggy address:
  0x00016b5e0c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00016b5e0d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00016b5e0d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00016b5e0e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00016b5e0e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x00016b5e0f00: 00 00 00 00 00 00 00 00 f1 f1 f1 f1[f8]f3 f3 f3
  0x00016b5e0f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00016b5e1000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00016b5e1080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00016b5e1100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00016b5e1180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==565==ABORTING
------------------------------------------


---- [ui] tests/ui/sanitizer/use-after-scope.rs stdout ----

error: test did not exit with failure! code=None
status: signal: 6 (SIGABRT)
command: cd "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/sanitizer/use-after-scope" && RUSTC="/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2/bin/rustc" RUST_TEST_THREADS="3" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/sanitizer/use-after-scope/a"
stdout: none
--- stderr -------------------------------
=================================================================
==582==ERROR: AddressSanitizer: stack-use-after-scope on address 0x00016fd41320 at pc 0x0001000bf040 bp 0x00016fd412b0 sp 0x00016fd412a8
WRITE of size 8 at 0x00016fd41320 thread T0
    #0 0x0001000bf03c in core::ptr::write_volatile::hee3034a63611905f+0x6c (a:arm64+0x10000303c)
    #1 0x0001000bf554 in use_after_scope::main::hd05643c713462332+0x180 (a:arm64+0x100003554)
    #2 0x0001000befc0 in core::ops::function::FnOnce::call_once::hd61f22ab1f6305f6+0xc (a:arm64+0x100002fc0)
    #3 0x0001000bef08 in std::sys::backtrace::__rust_begin_short_backtrace::hf65c99aa429bc993+0x8 (a:arm64+0x100002f08)
    #4 0x0001000beee8 in std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::h4f30cfbe1b678f74+0x44 (a:arm64+0x100002ee8)
    #5 0x000101cc2224 in std::rt::lang_start_internal::h6eca7cfef2d1cdc4+0x53c (libstd-fd99cb7cdde5a0fc.dylib:arm64+0x1e224)
    #6 0x0001000bee24 in std::rt::lang_start::heb528eaa17233e68+0x12c (a:arm64+0x100002e24)
    #7 0x0001000bf5ec in main+0x20 (a:arm64+0x1000035ec)
    #8 0x00018362f150  (<unknown module>)
    #9 0x2e247ffffffffffc  (<unknown module>)

Address 0x00016fd41320 is located in stack of thread T0 at offset 32 in frame
    #0 0x0001000bf3e0 in use_after_scope::main::hd05643c713462332+0xc (a:arm64+0x1000033e0)

  This frame has 1 object(s):
    [32, 40) 'x' <== Memory access at offset 32 is inside this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
      (longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-use-after-scope (a:arm64+0x10000303c) in core::ptr::write_volatile::hee3034a63611905f+0x6c
Shadow bytes around the buggy address:
  0x00016fd41080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00016fd41100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00016fd41180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00016fd41200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00016fd41280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x00016fd41300: f1 f1 f1 f1[f8]f3 f3 f3 00 00 00 00 00 00 00 00
  0x00016fd41380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00016fd41400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00016fd41480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00016fd41500: f1 f1 f1 f1 00 f3 f3 f3 00 00 00 00 00 00 00 00
  0x00016fd41580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==582==ABORTING
------------------------------------------


---- [ui] tests/ui/sanitizer/thread.rs stdout ----

error: test did not exit with failure! code=None
status: signal: 6 (SIGABRT)
command: cd "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/sanitizer/thread" && RUSTC="/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2/bin/rustc" RUST_TEST_THREADS="3" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/sanitizer/thread/a"
stdout: none
--- stderr -------------------------------
==================
WARNING: ThreadSanitizer: data race (pid=578)
  Write of size 4 at 0x00010a000390 by main thread:
    #0 thread::main::h092145c3c069919c <null> (a:arm64+0x100003ac4)
    #1 std::sys::backtrace::__rust_begin_short_backtrace::h3ad89200cc27ed56 <null> (a:arm64+0x100003974)
    #2 std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::h86ccc0ba1eda8a0a <null> (a:arm64+0x100003930)
    #3 std::rt::lang_start_internal::h6eca7cfef2d1cdc4 <null> (libstd-fd99cb7cdde5a0fc.dylib:arm64+0x1e224)
    #4 <null> <null> (0x00018362f154)

  Previous write of size 4 at 0x00010a000390 by thread T1:
    #0 thread::start::h386f8bedcc2fd91d <null> (a:arm64+0x100003a10)

  Location is heap block of size 4 at 0x00010a000390 allocated by main thread:
    #0 malloc sanitizer_malloc_mac.inc:137 (librustc-nightly_rt.tsan.dylib:arm64+0x58730)
    #1 thread::main::h092145c3c069919c <null> (a:arm64+0x100003a70)
    #2 std::sys::backtrace::__rust_begin_short_backtrace::h3ad89200cc27ed56 <null> (a:arm64+0x100003974)
    #3 std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::h86ccc0ba1eda8a0a <null> (a:arm64+0x100003930)
    #4 std::rt::lang_start_internal::h6eca7cfef2d1cdc4 <null> (libstd-fd99cb7cdde5a0fc.dylib:arm64+0x1e224)
    #5 <null> <null> (0x00018362f154)

  Thread T1 (tid=394666, running) created by main thread at:
    #0 pthread_create tsan_interceptors_posix.cpp:1041 (librustc-nightly_rt.tsan.dylib:arm64+0x326dc)
    #1 thread::main::h092145c3c069919c <null> (a:arm64+0x100003aa8)
    #2 std::sys::backtrace::__rust_begin_short_backtrace::h3ad89200cc27ed56 <null> (a:arm64+0x100003974)
    #3 std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::h86ccc0ba1eda8a0a <null> (a:arm64+0x100003930)
    #4 std::rt::lang_start_internal::h6eca7cfef2d1cdc4 <null> (libstd-fd99cb7cdde5a0fc.dylib:arm64+0x1e224)
    #5 <null> <null> (0x00018362f154)

SUMMARY: ThreadSanitizer: data race (a:arm64+0x100003ac4) in thread::main::h092145c3c069919c+0x8c
==================
ThreadSanitizer: reported 1 warnings
------------------------------------------


---- [ui] tests/ui/sanitizer/new-llvm-pass-manager-thin-lto.rs#opt1 stdout ----

error in revision `opt1`: test did not exit with failure! code=None
status: signal: 6 (SIGABRT)
command: cd "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/sanitizer/new-llvm-pass-manager-thin-lto.opt1" && RUSTC="/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2/bin/rustc" RUST_TEST_THREADS="3" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/sanitizer/new-llvm-pass-manager-thin-lto.opt1/a"
stdout: none
--- stderr -------------------------------
=================================================================
==796==ERROR: AddressSanitizer: stack-use-after-scope on address 0x00016fa25440 at pc 0x0001003e12b8 bp 0x00016fa25410 sp 0x00016fa25408
WRITE of size 8 at 0x00016fa25440 thread T0
    #0 0x0001003e12b4 in new_llvm_pass_manager_thin_lto::main::h36cf764fd0e6dc59+0xf4 (a:arm64+0x1000092b4)
    #1 0x0001003e1178 in std::sys::backtrace::__rust_begin_short_backtrace::h7621c4732034532b+0x8 (a:arm64+0x100009178)
    #2 0x0001003e1158 in std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::h5052f97da0d1bc1f+0x24 (a:arm64+0x100009158)
    #3 0x0001003fdc50 in std::rt::lang_start_internal::h6eca7cfef2d1cdc4+0x4f0 (a:arm64+0x100025c50)
    #4 0x0001003e1374 in main+0xb8 (a:arm64+0x100009374)
    #5 0x00018362f150  (<unknown module>)
    #6 0x9a297ffffffffffc  (<unknown module>)

Address 0x00016fa25440 is located in stack of thread T0 at offset 32 in frame
    #0 0x0001003e11cc in new_llvm_pass_manager_thin_lto::main::h36cf764fd0e6dc59+0xc (a:arm64+0x1000091cc)

  This frame has 1 object(s):
    [32, 40) 'x' <== Memory access at offset 32 is inside this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
      (longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-use-after-scope (a:arm64+0x1000092b4) in new_llvm_pass_manager_thin_lto::main::h36cf764fd0e6dc59+0xf4
Shadow bytes around the buggy address:
  0x00016fa25180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00016fa25200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00016fa25280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00016fa25300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00016fa25380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x00016fa25400: 00 00 00 00 f1 f1 f1 f1[f8]f3 f3 f3 00 00 00 00
  0x00016fa25480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00016fa25500: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
  0x00016fa25580: 00 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
  0x00016fa25600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00016fa25680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==796==ABORTING
------------------------------------------



failures:

@bors
Copy link
Collaborator

bors commented Jun 27, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 27, 2025
@compiler-errors
Copy link
Member Author

I will triage after my workout ends :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool O-android Operating system: Android O-linux Operating system: Linux rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-release Relevant to the release subteam, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.