@@ -158,8 +158,8 @@ impl<'a, 'mir, 'tcx> EvalContextExt<'tcx> for super::MiriEvalContext<'a, 'mir, '
158158 // Dead allocations in miri cannot overlap with live allocations, but
159159 // on read hardware this can easily happen. Thus for comparisons we require
160160 // both pointers to be live.
161- self . memory ( ) . check_bounds_ptr ( left, InboundsCheck :: Live ) ?;
162- self . memory ( ) . check_bounds_ptr ( right, InboundsCheck :: Live ) ?;
161+ self . memory ( ) . check_bounds_ptr ( left, InboundsCheck :: Live , CheckInAllocMsg :: InboundsTest ) ?;
162+ self . memory ( ) . check_bounds_ptr ( right, InboundsCheck :: Live , CheckInAllocMsg :: InboundsTest ) ?;
163163 // Two in-bounds pointers, we can compare across allocations.
164164 left == right
165165 }
@@ -183,7 +183,7 @@ impl<'a, 'mir, 'tcx> EvalContextExt<'tcx> for super::MiriEvalContext<'a, 'mir, '
183183 if bits < 32 {
184184 // Test if the ptr is in-bounds. Then it cannot be NULL.
185185 // Even dangling pointers cannot be NULL.
186- if self . memory ( ) . check_bounds_ptr ( ptr, InboundsCheck :: MaybeDead ) . is_ok ( ) {
186+ if self . memory ( ) . check_bounds_ptr ( ptr, InboundsCheck :: MaybeDead , CheckInAllocMsg :: NullPointerTest ) . is_ok ( ) {
187187 return Ok ( false ) ;
188188 }
189189 }
@@ -340,9 +340,9 @@ impl<'a, 'mir, 'tcx> EvalContextExt<'tcx> for super::MiriEvalContext<'a, 'mir, '
340340 if let Scalar :: Ptr ( ptr) = ptr {
341341 // Both old and new pointer must be in-bounds of a *live* allocation.
342342 // (Of the same allocation, but that part is trivial with our representation.)
343- self . memory ( ) . check_bounds_ptr ( ptr, InboundsCheck :: Live ) ?;
343+ self . memory ( ) . check_bounds_ptr ( ptr, InboundsCheck :: Live , CheckInAllocMsg :: InboundsTest ) ?;
344344 let ptr = ptr. signed_offset ( offset, self ) ?;
345- self . memory ( ) . check_bounds_ptr ( ptr, InboundsCheck :: Live ) ?;
345+ self . memory ( ) . check_bounds_ptr ( ptr, InboundsCheck :: Live , CheckInAllocMsg :: InboundsTest ) ?;
346346 Ok ( Scalar :: Ptr ( ptr) )
347347 } else {
348348 // An integer pointer. They can only be offset by 0, and we pretend there
0 commit comments