Skip to content

fix ICE on specific malformed asm clobber_abi #112683

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

Merged
merged 1 commit into from
Jun 17, 2023

Conversation

asquared31415
Copy link
Contributor

fixes #112635

@rustbot
Copy link
Collaborator

rustbot commented Jun 15, 2023

r? @TaKO8Ki

(rustbot has picked a reviewer for you, use r? to override)

@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 15, 2023
@asquared31415 asquared31415 marked this pull request as ready for review June 15, 2023 21:49

fn main() {
unsafe {
asm!("", clobber_abi(1)); //~ ERROR expected string literal
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you do clobber_abi() without any args too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a test in the x86_64 specific tests that handles this:

asm!("", clobber_abi());
//~^ ERROR at least one abi must be provided

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm now that I think about it, that file should be brought out to the main asm tests and this file's contents added to it

@compiler-errors
Copy link
Member

r=me with one additional example (unless there's already a ui test that excersies this behavior somewhere)

r? @compiler-errors @bors delegate+

@bors
Copy link
Collaborator

bors commented Jun 15, 2023

✌️ @asquared31415, you can now approve this pull request!

If @compiler-errors told you to "r=me" after making some further change, please make that change, then do @bors r=@compiler-errors

@asquared31415
Copy link
Contributor Author

@bors r=compiler-errors

@bors
Copy link
Collaborator

bors commented Jun 15, 2023

📌 Commit e8824d6 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 15, 2023
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Jun 16, 2023
…ompiler-errors

fix ICE on specific malformed asm clobber_abi

fixes rust-lang#112635
@Dylan-DPC
Copy link
Member

failed in rollup

@bors r-

@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 16, 2023
@asquared31415
Copy link
Contributor Author

@bors r=compiler-errors

@bors
Copy link
Collaborator

bors commented Jun 16, 2023

📌 Commit 1fcb0c74f9549207d35cd85675f3c221012ef982 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 16, 2023
@compiler-errors
Copy link
Member

thank

@bors r+

@bors
Copy link
Collaborator

bors commented Jun 16, 2023

📌 Commit 3dc793e has been approved by compiler-errors

It is now in the queue for this repository.

bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 17, 2023
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#112352 (Fix documentation build on FreeBSD)
 - rust-lang#112644 (Correct types in method descriptions of `NonZero*` types)
 - rust-lang#112683 (fix ICE on specific malformed asm clobber_abi)
 - rust-lang#112707 ([rustdoc] Fix invalid handling of "going back in history" when "go to only search result" setting is enabled)
 - rust-lang#112719 (Replace fvdl with ffx, allow test without install)
 - rust-lang#112728 (Add `<meta charset="utf-8">` to `-Zdump-mir-spanview` output)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 7051c84 into rust-lang:master Jun 17, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jun 17, 2023
@asquared31415 asquared31415 deleted the asm_clobber_ice branch June 22, 2023 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

ice: asm: unreachable
6 participants