File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/borrow_tracker/tree_borrows Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -355,8 +355,11 @@ trait EvalContextPrivExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
355
355
// Store initial permissions.
356
356
for ( _loc_range, loc) in perms_map. iter_mut ( range. start , range. size ) {
357
357
let sifa = perm. strongest_idempotent_foreign_access ( protected) ;
358
- // NOTE: `access` is false if and only if `perm` is Cell, so this `if`
359
- // doesn't not change whether any code is UB or not.
358
+ // NOTE: Currently, `access` is false if and only if `perm` is Cell, so this `if`
359
+ // doesn't not change whether any code is UB or not. We could just always use
360
+ // `new_accessed` and everything would stay the same. But that seems conceptually
361
+ // odd, so we keep the initial "accessed" bit of the `LocationState` in sync with whether
362
+ // a read access is performed below.
360
363
if access {
361
364
* loc = LocationState :: new_accessed ( perm, sifa) ;
362
365
} else {
You can’t perform that action at this time.
0 commit comments