-
Notifications
You must be signed in to change notification settings - Fork 349
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
Stacked borrow implementation of miri may mistreat statics since they aren't places anymore #1122
Comments
Looks like Miri's test suite still works fine... I think what'll happen is that the embedded const pointers end up with their tag determined by |
Wait, rust-lang/rust#67000 didn't land yet, so what is the current status? |
rust-lang/rust#67000 is for promoteds. statics have already landed |
Oh I see. Do you have a PR reference for that? |
How can that have landed without touching Oh I guess that still exists for promoteds? |
Yea all of these are dead code to be removed by rust-lang/rust#67000 |
Well let's get back to this issue then once rust-lang/rust#67000 lands. Clearly right now everything is a mess.^^ |
Also I think it might be better to move this to the Miri repo. This is specifically about the Stacked Borrows implementation, which we track there. So I'll move it if I can. |
rust-lang/rust#67000 has landed, and from all I can see Stacked Borrows for globals behaves exactly as it should. The miri engine uses So, closing this as everything seems just fine. |
cc @spastorino @RalfJung
The way we represent statics and promoteds in MIR changed from them being an explicit place to them just being a constant that is a reference to the static (rust-lang/rust#67000). Since this was supported before anyway, we remove the special case of statics being referencable both via a
Place
and via a constant.This change may have broken how stacked borrows process references to statics. We should run miri on a few examples and see whether the borrows assigned change in a significant way.
related discussion on zulip: https://rust-lang.zulipchat.com/#narrow/stream/146212-t-compiler.2Fconst-eval/topic/promoteds.20are.20not.20places
The text was updated successfully, but these errors were encountered: