Skip to content

Conversation

@nia-e
Copy link
Member

@nia-e nia-e commented Oct 11, 2025

Adds support for tracing mmaps in native code and logging that. Notably does not let us call libc::mmap(..) on the Rust side and then munmap it on the native side / the other way; I have ideas for maybe doing that, but they'd be quite a bit more involved since it requires us doing some syscall shimming.

@rustbot
Copy link
Collaborator

rustbot commented Oct 11, 2025

Thank you for contributing to Miri!
Please remember to not force-push to the PR branch except when you need to rebase due to a conflict or when the reviewer asks you for it.

@rustbot rustbot added the S-waiting-on-review Status: Waiting for a review to complete label Oct 11, 2025
@nia-e nia-e force-pushed the alloc-tracing-mmap branch 3 times, most recently from 48dbe59 to 8ec819f Compare October 11, 2025 06:13
@nia-e nia-e force-pushed the alloc-tracing-mmap branch from 8ec819f to d48a1cc Compare October 11, 2025 06:36
@RalfJung
Copy link
Member

I saw the PR and it's in my queue, but it's a big one so it may take a bit until I have time to dig into this -- sorry.

@nia-e
Copy link
Member Author

nia-e commented Oct 17, 2025

Realised this actually has a couple issues that need to be addressed and I could do that in this implementation relatively simply, or rewrite it to be better in every way (so we can call mmap on one side of the ffi boundary and munmap on the other w/ the same pointer, and vice versa) with a tiny tiny bit of inline assembly. I think I'll do that and mark this as a draft

@nia-e
Copy link
Member Author

nia-e commented Oct 17, 2025

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: Waiting for the PR author to address review comments and removed S-waiting-on-review Status: Waiting for a review to complete labels Oct 17, 2025
@nia-e nia-e marked this pull request as draft October 17, 2025 22:17
@oli-obk oli-obk self-assigned this Oct 18, 2025
@oli-obk
Copy link
Contributor

oli-obk commented Oct 18, 2025

Nia gave me a crash course in various of those ideas at eurorust. I'll do the first reviews and assign to you (Ralf) once I think it's ready

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

Labels

S-waiting-on-author Status: Waiting for the PR author to address review comments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants