@@ -142,8 +142,8 @@ impl<'a, 'mir, 'tcx> EvalContextExt<'tcx> for EvalContext<'a, 'mir, 'tcx, super:
142142 // allocations sit right next to each other. The C/C++ standards are
143143 // somewhat fuzzy about this case, so I think for now this check is
144144 // "good enough".
145- self . memory . check_bounds ( left, false ) ?;
146- self . memory . check_bounds ( right, false ) ?;
145+ self . memory . check_bounds_ptr ( left, false ) ?;
146+ self . memory . check_bounds_ptr ( right, false ) ?;
147147 // Two live in-bounds pointers, we can compare across allocations
148148 left == right
149149 }
@@ -153,7 +153,7 @@ impl<'a, 'mir, 'tcx> EvalContextExt<'tcx> for EvalContext<'a, 'mir, 'tcx, super:
153153 ( Scalar :: Bits { bits, size } , Scalar :: Ptr ( ptr) ) => {
154154 assert_eq ! ( size as u64 , self . pointer_size( ) . bytes( ) ) ;
155155 let bits = bits as u64 ;
156- let ( alloc_size, alloc_align) = self . memory . get_size_and_align ( ptr. alloc_id ) ? ;
156+ let ( alloc_size, alloc_align) = self . memory . get_size_and_align ( ptr. alloc_id ) ;
157157
158158 // Case I: Comparing with NULL
159159 if bits == 0 {
@@ -288,9 +288,9 @@ impl<'a, 'mir, 'tcx> EvalContextExt<'tcx> for EvalContext<'a, 'mir, 'tcx, super:
288288 if let Scalar :: Ptr ( ptr) = ptr {
289289 // Both old and new pointer must be in-bounds.
290290 // (Of the same allocation, but that part is trivial with our representation.)
291- self . memory . check_bounds ( ptr, false ) ?;
291+ self . memory . check_bounds_ptr ( ptr, false ) ?;
292292 let ptr = ptr. signed_offset ( offset, self ) ?;
293- self . memory . check_bounds ( ptr, false ) ?;
293+ self . memory . check_bounds_ptr ( ptr, false ) ?;
294294 Ok ( Scalar :: Ptr ( ptr) )
295295 } else {
296296 // An integer pointer. They can only be offset by 0, and we pretend there
0 commit comments