File tree 2 files changed +6
-3
lines changed
borrow_tracker/stacked_borrows
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> {
673
673
// attempt to use it for a non-zero-sized access.
674
674
// Dangling slices are a common case here; it's valid to get their length but with raw
675
675
// 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
+ {
677
678
log_creation ( this, Some ( ( alloc_id, base_offset, orig_tag) ) ) ?;
678
679
// Still give it the new provenance, it got retagged after all.
679
680
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> {
81
81
return Ok ( None ) ;
82
82
} ;
83
83
// 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
+ ) ;
86
88
Ok ( Some ( var_ptr) )
87
89
}
88
90
You can’t perform that action at this time.
0 commit comments