Skip to content

trace: incorporate events #4456

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nia-e
Copy link
Contributor

@nia-e nia-e commented Jul 8, 2025

If tracing is enabled, use the info from the trace to actually update Miri's state. Pending a small change to rustc to expose some necessary interfaces to handle writes, this should be good!

@nia-e
Copy link
Contributor Author

nia-e commented Jul 8, 2025

Ah, I forgot I rebased this on top of #4435. Just the last commit is relevant for now

@nia-e nia-e force-pushed the trace-incorporate-events branch 2 times, most recently from acbf7f3 to a8694a4 Compare July 8, 2025 08:52
@RalfJung RalfJung added the S-blocked Status: blocked on something happening somewhere else label Jul 8, 2025
@nia-e nia-e force-pushed the trace-incorporate-events branch 5 times, most recently from 4326ab5 to 180efe5 Compare July 8, 2025 09:30
@RalfJung
Copy link
Member

RalfJung commented Jul 8, 2025

What this PR definitely needs is some tests. :) Remember that tracing mode is off-by-default; none of the tests hit the tracing infra. So this needs some new native-mode tests that specifically check that we detect the ranges properly. For instance, sharing a 2-field uninit struct with C, having C initialize the first field, and then reading the 2nd field -- that should be UB.

@nia-e
Copy link
Contributor Author

nia-e commented Jul 9, 2025

I actually wrote some! Just didn't know if they belong here. I'll add them, though

@nia-e nia-e force-pushed the trace-incorporate-events branch 4 times, most recently from 14657e3 to 9b408f4 Compare July 9, 2025 15:24
wip: tests
@nia-e nia-e force-pushed the trace-incorporate-events branch from 6d91006 to 3d16495 Compare July 9, 2025 19:51
rust-bors bot added a commit to rust-lang/rust that referenced this pull request Jul 9, 2025
interpret/allocation: expose init + write_wildcards on a range

Part of rust-lang/miri#4456, so that we can mark down when a foreign access to our memory happened. Should this also move `prepare_for_native_access()` itself into Miri, given that everything there can be implemented on Miri's side?

r? `@RalfJung`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-blocked Status: blocked on something happening somewhere else
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants