File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -717,7 +717,7 @@ pub trait EvalContextExt<'tcx>: MiriInterpCxExt<'tcx> {
717
717
// The program didn't actually do a read, so suppress the memory access hooks.
718
718
// This is also a very special exception where we just ignore an error -- if this read
719
719
// 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 ( ) ;
721
721
this. allow_data_races_mut ( move |this| this. write_scalar ( val, dest) ) ?;
722
722
this. validate_atomic_store ( dest, atomic) ?;
723
723
this. buffered_atomic_write ( val, dest, atomic, old_val)
Original file line number Diff line number Diff line change @@ -411,9 +411,9 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
411
411
} ;
412
412
let res = this. binary_op ( op, & a, & b) ?;
413
413
// `binary_op` already called `generate_nan` if needed.
414
- // Apply a relative error of 16ULP to simulate non-deterministic precision loss
414
+ // Apply a relative error of 4ULP to simulate non-deterministic precision loss
415
415
// due to optimizations.
416
- let res = apply_random_float_error_to_imm ( this, res, 4 /* log2(16 ) */ ) ?;
416
+ let res = apply_random_float_error_to_imm ( this, res, 2 /* log2(4 ) */ ) ?;
417
417
this. write_immediate ( * res, dest) ?;
418
418
}
419
419
@@ -464,9 +464,9 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
464
464
if !float_finite ( & res) ? {
465
465
throw_ub_format ! ( "`{intrinsic_name}` intrinsic produced non-finite value as result" ) ;
466
466
}
467
- // Apply a relative error of 16ULP to simulate non-deterministic precision loss
467
+ // Apply a relative error of 4ULP to simulate non-deterministic precision loss
468
468
// due to optimizations.
469
- let res = apply_random_float_error_to_imm ( this, res, 4 /* log2(16 ) */ ) ?;
469
+ let res = apply_random_float_error_to_imm ( this, res, 2 /* log2(4 ) */ ) ?;
470
470
this. write_immediate ( * res, dest) ?;
471
471
}
472
472
You can’t perform that action at this time.
0 commit comments