Skip to content

core: Add examples and assembly tests for abort_immediate - #163575

Open
tgross35 wants to merge 3 commits into
rust-lang:mainfrom
tgross35:abort-immediate-update
Open

tgross35 wants to merge 3 commits into
rust-lang:mainfrom
tgross35:abort-immediate-update

Conversation

@tgross35

@tgross35 tgross35 commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

This isn't the most complicated function, but it currently isn't used
anywhere in-tree (typically intrinsics::abort is used instead) and
there are no examples or tests. Copy the examples from abort since
this should behave similarly, and also cover it in an assembly test. We
don't really need the assembly check for any guarantees but it is handy
to reference what the intrinsic actually does, and will let us know if
anything changes.

I also added tests for breakpoint on more platforms since these were
easy to do together.

Tracking issue: #154601

@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 Oct 1, 2026
@rustbot

rustbot commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

r? @JonathanBrouwer

rustbot has assigned @JonathanBrouwer.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 77 candidates
  • Random selection from 21 candidates

@tgross35

tgross35 commented Oct 1, 2026

Copy link
Copy Markdown
Member Author

r? libs

@rustbot rustbot assigned JohnTitor and unassigned JonathanBrouwer Oct 1, 2026
@rust-log-analyzer

This comment has been minimized.

@tgross35
tgross35 force-pushed the abort-immediate-update branch from 557140b to 854e087 Compare October 1, 2026 02:25
@rust-log-analyzer

This comment has been minimized.

@tgross35
tgross35 force-pushed the abort-immediate-update branch from 854e087 to f9ee87d Compare October 1, 2026 03:03
@rust-log-analyzer

This comment has been minimized.

@tgross35
tgross35 force-pushed the abort-immediate-update branch from f9ee87d to a39b690 Compare October 1, 2026 04:01
@rust-log-analyzer

This comment has been minimized.

@tgross35

tgross35 commented Oct 1, 2026

Copy link
Copy Markdown
Member Author

My scratch space for seeing what the various arches do https://rust.godbolt.org/z/Gs9jKPG7x

@tgross35
tgross35 force-pushed the abort-immediate-update branch from a39b690 to 70d4713 Compare October 1, 2026 05:27
@tgross35

tgross35 commented Oct 1, 2026

Copy link
Copy Markdown
Member Author

@bors try jobs=test-x86_64-gnu-nopt,test-various,test-x86_64-gnu-llvm-22-*

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Oct 1, 2026
core: Add examples and assembly tests for `abort_immediate`


try-job: test-x86_64-gnu-nopt
try-job: test-various
try-job: test-x86_64-gnu-llvm-22-*
@rust-log-analyzer

This comment has been minimized.

@tgross35
tgross35 force-pushed the abort-immediate-update branch from 70d4713 to 9f595d3 Compare October 1, 2026 18:48
@tgross35

tgross35 commented Oct 1, 2026

Copy link
Copy Markdown
Member Author

@bors try jobs=test-x86_64-gnu-nopt,test-various,test-x86_64-gnu-llvm-22-*

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Oct 1, 2026
core: Add examples and assembly tests for `abort_immediate`


try-job: test-x86_64-gnu-nopt
try-job: test-various
try-job: test-x86_64-gnu-llvm-22-*
@rust-bors

rust-bors Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 37b4513 (37b4513e2f97ccce286b5cd75747efaa239f81a1)
Base parent: 837b18a (837b18aae097503892d7aab6c7ddce332a991a21)

@rust-bors

This comment has been minimized.

We can reuse the test setup for other intrinsics, saving a bit of build
time and repeated setup.
This isn't the most complicated function, but it currently isn't used
anywhere in-tree (typically `intrinsics::abort` is used instead) and
there are no examples or tests. Copy the examples from `abort` since
this should behave similarly, and also cover it in an assembly test. We
don't really need the assembly check for any guarantees but it is handy
to reference what the intrinsic actually does, and will let us know if
anything changes.

I also added tests for `breakpoint` on more platforms since these were
easy to do together.
@tgross35
tgross35 force-pushed the abort-immediate-update branch from 4de6e3a to 572ebd3 Compare October 2, 2026 19:25
@rustbot

rustbot commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

This branch has not been deployed

No deployments
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.

5 participants