File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -326,11 +326,11 @@ trait EvalContextExtPriv<'tcx>: crate::MiriInterpCxExt<'tcx> {
326
326
let alloc_ptr = this. get_alloc_bytes_unchecked_raw ( id) ?;
327
327
let start_addr =
328
328
mplace_ptr. addr ( ) . bytes_usize ( ) . strict_sub ( alloc_ptr. addr ( ) ) ;
329
- for byte in start_addr..start_addr . strict_add ( sz ) {
330
- if let Some ( prov ) = alloc . provenance ( ) . get ( Size :: from_bytes ( byte ) , this )
331
- {
332
- this . expose_provenance ( prov ) ? ;
333
- }
329
+ for prov in alloc
330
+ . provenance ( )
331
+ . get_range ( this , ( start_addr..start_addr . strict_add ( sz ) ) . into ( ) )
332
+ {
333
+ this . expose_provenance ( prov ) ? ;
334
334
}
335
335
// SAFETY: We know for sure that at mplace_ptr.addr() the next layout.size
336
336
// bytes are part of this allocation and initialised. They might be marked
You can’t perform that action at this time.
0 commit comments