Skip to content

tests: Do not run afoul of asm.validity.non-exhaustive in input-stats #142285

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

workingjubilee
Copy link
Member

@workingjubilee workingjubilee commented Jun 10, 2025

This addresses one of the three powerpc64-unknown-linux-musl test failures in #142280

I was motivated to cover it myself because technically this is also compile-time UB if we compile a program that has asm! with x86-64-specific instructions on another platform. That'll only mean something if this is ever switched to build-pass, or if checking emits object code, but conveniently "nop" is valid assembly on all platforms anyone has implemented Rust codegen for. Even the weird ones LLVM doesn't support, like PA-RISC or Common Intermediate Language.

...except GPUs. Not sure about those.

r? @nnethercote

@rustbot
Copy link
Collaborator

rustbot commented Jun 10, 2025

nnethercote is not on the review rotation at the moment.
They may take a while to respond.

@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. labels Jun 10, 2025
@nnethercote
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jun 10, 2025

📌 Commit 3a5187a has been approved by nnethercote

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 10, 2025
fmease added a commit to fmease/rust that referenced this pull request Jun 10, 2025
…ly, r=nnethercote

tests: Do not run afoul of asm.validity.non-exhaustive in input-stats

This addresses one of the three powerpc64-unknown-linux-musl test failures in rust-lang#142280

I was motivated to cover it myself because technically this is also compile-time UB if we compile a program that has `asm!` with x86-64-specific instructions on another platform. That'll only mean something if this is ever switched to build-pass, or if checking emits object code, but conveniently "nop" is valid assembly on all platforms anyone has implemented Rust codegen for. Even the weird ones LLVM doesn't support, like PA-RISC or Common Intermediate Language.

...except GPUs. Not sure about those.

r? `@nnethercote`
bors added a commit that referenced this pull request Jun 11, 2025
Rollup of 13 pull requests

Successful merges:

 - #128425 (Make `missing_fragment_specifier` an unconditional error)
 - #141639 (Expose discriminant values in stable_mir)
 - #141967 (Configure bootstrap backport nominations through triagebot)
 - #142042 (Make E0621 missing lifetime suggestion verbose)
 - #142176 (tests: Split dont-shuffle-bswaps along opt-levels and arches)
 - #142235 (Build rustc with assertions in `dist-alt` jobs)
 - #142248 (Add supported asm types for LoongArch32)
 - #142272 (tests: Change ABIs in tests to more future-resilient ones)
 - #142282 (Only run `citool` tests on the `auto` branch)
 - #142285 (tests: Do not run afoul of asm.validity.non-exhaustive in input-stats)
 - #142297 (Implement `//@ needs-target-std` compiletest directive)
 - #142298 (Make loongarch-none target maintainers more easily pingable)
 - #142306 (Dont unwrap and re-wrap typing envs)

Failed merges:

 - #141942 (Implement representation options to smir)

r? `@ghost`
`@rustbot` modify labels: rollup
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Jun 11, 2025
…ly, r=nnethercote

tests: Do not run afoul of asm.validity.non-exhaustive in input-stats

This addresses one of the three powerpc64-unknown-linux-musl test failures in rust-lang#142280

I was motivated to cover it myself because technically this is also compile-time UB if we compile a program that has `asm!` with x86-64-specific instructions on another platform. That'll only mean something if this is ever switched to build-pass, or if checking emits object code, but conveniently "nop" is valid assembly on all platforms anyone has implemented Rust codegen for. Even the weird ones LLVM doesn't support, like PA-RISC or Common Intermediate Language.

...except GPUs. Not sure about those.

r? ``@nnethercote``
@workingjubilee
Copy link
Member Author

@bors r-

something's up.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 11, 2025
@workingjubilee workingjubilee force-pushed the dont-use-bad-assembly branch from 3a5187a to 07826e8 Compare June 11, 2025 04:58
@rustbot
Copy link
Collaborator

rustbot commented Jun 11, 2025

Changes to the size of AST and/or HIR nodes.

cc @nnethercote

@workingjubilee
Copy link
Member Author

...I don't understand why the test didn't fail in PR CI when I pushed it the first time?

@workingjubilee workingjubilee added the A-testsuite Area: The testsuite used to check the correctness of rustc label Jun 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants