Skip to content

Commit 0d9a524

Browse files
committed
interpret: add a version of run_for_validation for &self
1 parent 0628c70 commit 0d9a524

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)