@@ -574,7 +574,12 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
574
574
// even if the type they wrap would be less aligned (e.g. AtomicU64 on 32bit must
575
575
// be 8-aligned).
576
576
let align = Align :: from_bytes ( place. layout . size . bytes ( ) ) . unwrap ( ) ;
577
- this. memory . check_ptr_access_align ( place. ptr , place. layout . size , align, CheckInAllocMsg :: MemoryAccessTest ) ?;
577
+ this. memory . check_ptr_access_align (
578
+ place. ptr ,
579
+ place. layout . size ,
580
+ align,
581
+ CheckInAllocMsg :: MemoryAccessTest ,
582
+ ) ?;
578
583
// Perform regular access.
579
584
this. write_scalar ( val, dest) ?;
580
585
Ok ( ( ) )
@@ -595,7 +600,12 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
595
600
// even if the type they wrap would be less aligned (e.g. AtomicU64 on 32bit must
596
601
// be 8-aligned).
597
602
let align = Align :: from_bytes ( place. layout . size . bytes ( ) ) . unwrap ( ) ;
598
- this. memory . check_ptr_access_align ( place. ptr , place. layout . size , align, CheckInAllocMsg :: MemoryAccessTest ) ?;
603
+ this. memory . check_ptr_access_align (
604
+ place. ptr ,
605
+ place. layout . size ,
606
+ align,
607
+ CheckInAllocMsg :: MemoryAccessTest ,
608
+ ) ?;
599
609
600
610
// Perform atomic store
601
611
this. write_scalar_atomic ( val, & place, atomic) ?;
@@ -645,7 +655,12 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
645
655
// even if the type they wrap would be less aligned (e.g. AtomicU64 on 32bit must
646
656
// be 8-aligned).
647
657
let align = Align :: from_bytes ( place. layout . size . bytes ( ) ) . unwrap ( ) ;
648
- this. memory . check_ptr_access_align ( place. ptr , place. layout . size , align, CheckInAllocMsg :: MemoryAccessTest ) ?;
658
+ this. memory . check_ptr_access_align (
659
+ place. ptr ,
660
+ place. layout . size ,
661
+ align,
662
+ CheckInAllocMsg :: MemoryAccessTest ,
663
+ ) ?;
649
664
650
665
match atomic_op {
651
666
AtomicOp :: Min => {
@@ -682,7 +697,12 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
682
697
// even if the type they wrap would be less aligned (e.g. AtomicU64 on 32bit must
683
698
// be 8-aligned).
684
699
let align = Align :: from_bytes ( place. layout . size . bytes ( ) ) . unwrap ( ) ;
685
- this. memory . check_ptr_access_align ( place. ptr , place. layout . size , align, CheckInAllocMsg :: MemoryAccessTest ) ?;
700
+ this. memory . check_ptr_access_align (
701
+ place. ptr ,
702
+ place. layout . size ,
703
+ align,
704
+ CheckInAllocMsg :: MemoryAccessTest ,
705
+ ) ?;
686
706
687
707
let old = this. atomic_exchange_scalar ( & place, new, atomic) ?;
688
708
this. write_scalar ( old, dest) ?; // old value is returned
@@ -708,7 +728,12 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
708
728
// even if the type they wrap would be less aligned (e.g. AtomicU64 on 32bit must
709
729
// be 8-aligned).
710
730
let align = Align :: from_bytes ( place. layout . size . bytes ( ) ) . unwrap ( ) ;
711
- this. memory . check_ptr_access_align ( place. ptr , place. layout . size , align, CheckInAllocMsg :: MemoryAccessTest ) ?;
731
+ this. memory . check_ptr_access_align (
732
+ place. ptr ,
733
+ place. layout . size ,
734
+ align,
735
+ CheckInAllocMsg :: MemoryAccessTest ,
736
+ ) ?;
712
737
713
738
let old = this. atomic_compare_exchange_scalar (
714
739
& place,
0 commit comments