-
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
Add MemoryExtra to find_foreign_static #63951
Conversation
Sounds reasonable! @bors r+ rollup=never (I don't want this to land before the next nightly because it'll break Miri, and we desparately need a new working Miri shipped by rustup.) |
📌 Commit 0bd6df9 has been approved by |
💡 This pull request was already approved, no need to approve it again.
|
📌 Commit 0bd6df9 has been approved by |
No problem :) |
All right, now it can't land before midnight anyway. @bors rollup- |
I discovered that I also need to change |
@bors r- No, do it here |
Jmm wait a second... quoting the docs: "This allocation will then be fed to tag_allocation to initialize the extra state" |
Why that? Also what is |
yes, it is I thought that if I were able to keep the allocation's |
Hm... not sure that that makes sense. But indeed so far we didn't have foreign statics that can change, so it is possible that something will have to change here. I am not sure what the best design looks like. |
I think I'm using Edit: Anyway I'll do any other changes in other PR because they aren't as simple as I thought. Feel free to merge this whenever you think is appropiate |
No, that would just make your life even harder. |
But also you are getting initially tagged with |
Initial plan: also pass the On the Miri side, have state in I think that should work. It is also quite clumsy though. I'll need to sleep over it. |
@oli-obk is it possible, given the link name of a foreign static, to compute its What happens with something like extern {
static foo: *const libc::c_void;
}
mod bar {
extern {
static foo: *const libc::c_void;
}
} Will that be two separate |
Oh :/ yea that seems like we'd screw it up. I guess we can use the string name as a unique identifier. |
The problem is that every OTOH, I think it is fine for now to ICE if the program uses two |
I think we can close this PR and come back to it when I have a clearer idea on how to fix it |
r? @RalfJung @oli-obk
Related miri PR: rust-lang/miri#928