This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
borrow_tracker/stacked_borrows Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -673,7 +673,8 @@ trait EvalContextPrivExt<'tcx, 'ecx>: crate::MiriInterpCxExt<'tcx> {
673673 // attempt to use it for a non-zero-sized access.
674674 // Dangling slices are a common case here; it's valid to get their length but with raw
675675 // pointer tagging for example all calls to get_unchecked on them are invalid.
676- if let Ok ( ( alloc_id, base_offset, orig_tag) ) = this. ptr_try_get_alloc_id ( place. ptr ( ) , 0 ) {
676+ if let Ok ( ( alloc_id, base_offset, orig_tag) ) = this. ptr_try_get_alloc_id ( place. ptr ( ) , 0 )
677+ {
677678 log_creation ( this, Some ( ( alloc_id, base_offset, orig_tag) ) ) ?;
678679 // Still give it the new provenance, it got retagged after all.
679680 return Ok ( Some ( Provenance :: Concrete { alloc_id, tag : new_tag } ) ) ;
Original file line number Diff line number Diff line change @@ -81,8 +81,10 @@ impl<'tcx> UnixEnvVars<'tcx> {
8181 return Ok ( None ) ;
8282 } ;
8383 // The offset is used to strip the "{name}=" part of the string.
84- let var_ptr = var_ptr
85- . wrapping_offset ( Size :: from_bytes ( u64:: try_from ( name. len ( ) ) . unwrap ( ) . strict_add ( 1 ) ) , ecx) ;
84+ let var_ptr = var_ptr. wrapping_offset (
85+ Size :: from_bytes ( u64:: try_from ( name. len ( ) ) . unwrap ( ) . strict_add ( 1 ) ) ,
86+ ecx,
87+ ) ;
8688 Ok ( Some ( var_ptr) )
8789 }
8890
You can’t perform that action at this time.
0 commit comments