Skip to content

Commit 15697a9

Browse files
authored
Rollup merge of #139211 - RalfJung:interpret-run-for-validation, r=oli-obk
interpret: add a version of run_for_validation for &self Turns out we'll need this for some ongoing work in Miri. r? ``@oli-obk``
2 parents 3e82982 + 0d9a524 commit 15697a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/concurrency/data_race.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ pub trait EvalContextExt<'tcx>: MiriInterpCxExt<'tcx> {
717717
// The program didn't actually do a read, so suppress the memory access hooks.
718718
// This is also a very special exception where we just ignore an error -- if this read
719719
// was UB e.g. because the memory is uninitialized, we don't want to know!
720-
let old_val = this.run_for_validation(|this| this.read_scalar(dest)).discard_err();
720+
let old_val = this.run_for_validation_mut(|this| this.read_scalar(dest)).discard_err();
721721
this.allow_data_races_mut(move |this| this.write_scalar(val, dest))?;
722722
this.validate_atomic_store(dest, atomic)?;
723723
this.buffered_atomic_write(val, dest, atomic, old_val)

0 commit comments

Comments
 (0)