Skip to content

Conversation

@Airyshtoteles
Copy link

@Airyshtoteles Airyshtoteles commented Jan 26, 2026

This PR contains two fixes:

1. Regression test for #90815

Adds a test to verify that rustc properly handles the case when inline assembly requests more registers than available (emitting an error instead of crashing with SIGSEGV). The underlying issue was fixed in LLVM.

2. Documentation improvement for #151458

Updates the documentation for std::thread::panicking() to clarify that it returns true both during unwinding (panic = "unwind") and during the execution of the panic hook (panic = "abort").


Fixes #90815
Partially addresses #151458 (documentation aspect)

Copilot AI review requested due to automatic review settings January 26, 2026 08:57
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler 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. labels Jan 26, 2026
@rustbot
Copy link
Collaborator

rustbot commented Jan 26, 2026

r? @fee1-dead

rustbot has assigned @fee1-dead.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot

This comment has been minimized.

This comment was marked as spam.

@Airyshtoteles Airyshtoteles force-pushed the fix-issues-90815-151458 branch from 4b2c9cd to 83ff440 Compare January 26, 2026 09:38
@rust-log-analyzer

This comment has been minimized.

@Airyshtoteles Airyshtoteles force-pushed the fix-issues-90815-151458 branch from 83ff440 to 0a1f171 Compare January 26, 2026 10:16
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Jan 26, 2026

⚠️ Warning ⚠️

  • There are issue links (such as #123) in the commit messages of the following commits.
    Please move them to the PR description, to avoid spamming the issues with references to the commit, and so this bot can automatically canonicalize them to avoid issues with subtree.

@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu-llvm-20-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test [ui] tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs#thin1 ... ok
test [ui] tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs#fat3 ... ok
test [ui] tests/ui/extern/issue-95829.rs ... ok
test [ui] tests/ui/extern/issue-80074.rs ... ok
test [ui] tests/ui/extern/lgamma-linkage.rs ... ok
test [ui] tests/ui/extern/not-in-block.rs ... ok
test [ui] tests/ui/extern/unsized-extern-derefmove.rs ... ok
test [ui] tests/ui/extern/no-mangle-associated-fn.rs ... ok
test [ui] tests/ui/extern/windows-tcb-trash-13259.rs ... ok
test [ui] tests/ui/feature-gates/allow-features-empty.rs ... ok
---
test [ui] tests/ui/imports/ambiguous-6.rs ... ok
test [ui] tests/ui/imports/ambiguous-7.rs ... ok
test [ui] tests/ui/imports/ambiguous-4.rs ... ok
test [ui] tests/ui/imports/ambiguous-9.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-glob-vs-multiouter.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-globvsglob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-no-implicit-prelude.rs ... ok
test [ui] tests/ui/imports/ambiguous-8.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-non-prelude-core-glob.rs ... ok
test [ui] tests/ui/imports/ambiguous-glob-vs-expanded-extern.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-non-prelude-std-glob.rs ... ok
---
1 error: inline assembly requires more registers than available
- Error:   --> $DIR/exhausted-registers-issue-90815.rs:39:10
+   --> $DIR/exhausted-registers-issue-90815.rs:38:10
3    |
4 LL |         "mov {0}, r0",
5    |          ^^^^^^^^^^^

6 
7 error: aborting due to 1 previous error
+ 
---
To only update this specific test, also pass `--test-args asm/arm/exhausted-registers-issue-90815.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/asm/arm/exhausted-registers-issue-90815.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/asm/arm/exhausted-registers-issue-90815" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Cpanic=abort" "-Cforce-unwind-tables=yes" "--target" "armv7-unknown-linux-gnueabihf" "--extern" "minicore=/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/asm/arm/exhausted-registers-issue-90815/libminicore.rlib"
stdout: none
--- stderr -------------------------------
error: inline assembly requires more registers than available
##[error]  --> /checkout/tests/ui/asm/arm/exhausted-registers-issue-90815.rs:38:10
   |
LL |         "mov {0}, r0",
   |          ^^^^^^^^^^^

error: aborting due to 1 previous error
------------------------------------------

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rustc SIGSEGV on asm macro when no more registers are availaible

4 participants