-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Don't check interpret_interner when accessing a static to fix miri mutable statics #49216
Conversation
r? @estebank (rust_highfive has picked a reviewer for you, use r? to override) |
|
I think you need to adjust https://github.com/rust-lang/rust/blob/master/src/librustc_mir/interpret/const_eval.rs#L343 to check whether the static has already been computed. If so, don't call |
@oli-obk the problem is that I use a custom |
Oh I get that. I meant rustc's init static impl. The test failure is from that |
I get it |
34ff964
to
5f73901
Compare
Travis is green |
@bors r+ rollup |
📌 Commit 5aa29c4 has been approved by |
🌲 The tree is currently closed for pull requests below priority 30, this pull request will be tested once the tree is reopened |
Don't check interpret_interner when accessing a static to fix miri mutable statics Mutable statics don't work in my PR to fix the standalone [miri](https://github.com/solson/miri), as init_static didn't get called when the interpret_interner already contained a entry for the static, which is always immutable. cc rust-lang/miri#364
Don't check interpret_interner when accessing a static to fix miri mutable statics Mutable statics don't work in my PR to fix the standalone [miri](https://github.com/solson/miri), as init_static didn't get called when the interpret_interner already contained a entry for the static, which is always immutable. cc rust-lang/miri#364
Mutable statics don't work in my PR to fix the standalone miri, as init_static didn't get called when the interpret_interner already contained a entry for the static, which is always immutable.
cc rust-lang/miri#364