File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -255,7 +255,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
255
255
. collect :: < Vec < libffi:: high:: Arg < ' _ > > > ( ) ;
256
256
257
257
// Prepare all exposed memory (both previously exposed, and just newly exposed since a
258
- // pointer was passed as argument).
258
+ // pointer was passed as argument). Uninitialised memory is left as-is, but any data
259
+ // exposed this way is garbage anyway.
259
260
this. visit_reachable_allocs ( this. exposed_allocs ( ) , |this, alloc_id, info| {
260
261
// If there is no data behind this pointer, skip this.
261
262
if !matches ! ( info. kind, AllocKind :: LiveData ) {
@@ -275,8 +276,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
275
276
276
277
// Prepare for possible write from native code if mutable.
277
278
if info. mutbl . is_mut ( ) {
278
- let alloc = & mut this. get_alloc_raw_mut ( alloc_id) ?. 0 ;
279
- alloc. prepare_for_native_access ( ) ;
279
+ let ( alloc, cx ) = this. get_alloc_raw_mut ( alloc_id) ?;
280
+ alloc. process_native_write ( & cx . tcx , None ) ;
280
281
// Also expose *mutable* provenance for the interpreter-level allocation.
281
282
std:: hint:: black_box ( alloc. get_bytes_unchecked_raw_mut ( ) . expose_provenance ( ) ) ;
282
283
}
Original file line number Diff line number Diff line change @@ -97,6 +97,8 @@ fn miri_config(
97
97
let mut config = Config {
98
98
target : Some ( target. to_owned ( ) ) ,
99
99
program,
100
+ // When changing this, remember to also adjust the logic in bootstrap, in Miri's test step,
101
+ // that deletes the `miri_ui` dir when it needs a rebuild.
100
102
out_dir : PathBuf :: from ( env ! ( "CARGO_TARGET_TMPDIR" ) ) . join ( "miri_ui" ) ,
101
103
threads : std:: env:: var ( "MIRI_TEST_THREADS" )
102
104
. ok ( )
You can’t perform that action at this time.
0 commit comments