Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add GlobalAsm as a valid ItemKind to StableMIR #138025

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
celinval wants to merge 1 commit into rust-lang:master
base: master
Choose a base branch
Loading
from celinval:issue-0095-global-asm

Conversation

Copy link
Contributor

@celinval celinval commented Mar 5, 2025

This fixes StableMIR crash when iterating over the items of a crate that contains global assembly.

Fixes rust-lang/project-stable-mir#95

This fixes StableMIR crash when iterating over the items of a crate
that contains global assembly.
Copy link
Collaborator

rustbot commented Mar 5, 2025

r? @scottmcm

rustbot has assigned @scottmcm.
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 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 Mar 5, 2025
Copy link
Collaborator

rustbot commented Mar 5, 2025

This PR changes Stable MIR

cc @oli-obk, @celinval, @ouz-a

Copy link
Member

compiler-errors commented Mar 5, 2025
edited
Loading

This actually technically conflicts with #137502, which removes global_asm from the mir_keys, and which indirectly fixes the ICE in rust-lang/project-stable-mir#95.

They shouldn't have been there in the first place, but also the fn all_local_items() function is a bit unclear; it should probably be listing global asm items too, and possibly items without bodies like structs. I think it shouldn't be piggybacking off of the mir_keys query at all, but iterating over some other set of local def ids and filtering those out based off of their DefKind.

Could you please wait until #137502 is landed? Then please adjust the fn all_local_items() to be more clear about what kinds of items it's returning 🤔 happy to chat about that if you want to work that design part out.

@rustbot blocked

celinval reacted with thumbs up emoji

@rustbot rustbot added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 5, 2025
Copy link
Contributor Author

celinval commented Mar 8, 2025

@compiler-errors let's chat about the kinds of items you think we should return here, and the best way to implement that. This is today one of the main entry points to StableMir.

I'm also considering adding a stable API to get the results from rustc's collector, likely without the cgu part.

Copy link
Collaborator

bors commented Apr 5, 2025

☔ The latest upstream changes (presumably #139417) made this pull request unmergeable. Please resolve the merge conflicts.

github-merge-queue bot pushed a commit to model-checking/kani that referenced this pull request Jul 24, 2025
Per conversation in rust-lang/rust#138025,
[another PR](rust-lang/rust#137502) resolved
this issue upstream.
Resolves #3919
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.
Copy link
Member

@celinval any updates on this? thanks

Copy link
Contributor Author

celinval commented Sep 3, 2025

Not yet. I'll pick this back up next week after rustconf.

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

@compiler-errors compiler-errors compiler-errors approved these changes

Labels
S-blocked Status: Blocked on something else such as an RFC or other implementation work. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Panic in item.kind() when the underlying item kind is GlobalAsm

AltStyle によって変換されたページ (->オリジナル) /