-
Notifications
You must be signed in to change notification settings - Fork 344
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
Support more ways of using mmap #3605
Comments
I haven't read the discussion fully, but here unsupported cases which were encountered by me:
|
I think at one point I started working on all of these then backed out. So here are some notes.
Is this useful without supporting file mappings? Adding file mappings would be a whole thing in itself; I don't think we can support
I don't know what semantics people expect when a program tries to access
I tripped over my own feed trying to wire this up before, because of the many ways that Can you link your codebase that uses these APIs? That would be quite educational. |
In our case we use it to reserve physical memory. Our program allocates one big memory chunk at startup and then works mostly with it. As I understand it, relying on
We use it to reserve one big continuous chunk of virtual memory which then gets mapped using
Unfortunately, it's a proprietary product and we do not have plans to open source it in the near future. |
Do you rely on multiple I'm asking because the model that Miri implements right now is that |
This one. We effectively implement a custom
Right now we rely on |
There's been a bunch of discussion around that, but the gist is that currently this isn't something LLVM supports. See e.g. this thread. I brought this up with LLVM and I think it's a docs-only change to add support for at least a basic version of this -- but before we allow anything like that in Miri or otherwise consider this a blessed pattern in Rust, we need to get LLVM fixed. (Also note that This issue is mostly about supporting more things to be done with |
Yes, I understand. This is why I haven't mentioned use of |
In a lengthy Zulip discussion, it was discovered that there are modes of use of mmap that are perfectly fine within the scope of Rust's memory model, but not supported by Miri's current implementation:
See here for some example code. Thanks to Nils for helping with the exploration here!
The text was updated successfully, but these errors were encountered: