Skip to content

Conversation

@royAmmerschuber
Copy link
Contributor

The Tree::perform_access function currently is used for both normal accesses and protector release accesses.
However, both of these are handled by different branches and don't share any code, so this splits them into two separate functions.

@rustbot
Copy link
Collaborator

rustbot commented Dec 4, 2025

Thank you for contributing to Miri! A reviewer will take a look at your PR, typically within a week or two.
Please remember to not force-push to the PR branch except when you need to rebase due to a conflict or when the reviewer asks you for it.

@rustbot rustbot added the S-waiting-on-review Status: Waiting for a review to complete label Dec 4, 2025
Copy link
Member

@RalfJung RalfJung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense! Just some minor nits.

View changes since this review

access_range_and_kind: Option<(AllocRange, AccessKind, diagnostics::AccessCause)>,
access_range: AllocRange,
access_kind: AccessKind,
access_cause: AccessCause,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

access_cause is also just used for diagnostics I assume?

}
interp_ok(())
}
/// this is the special access that is applied on protector release:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// this is the special access that is applied on protector release:
/// This is the special access that is applied on protector release:

/// - and it will be a read except if the location is `Unique`, i.e. has been written to,
/// in which case it will be a write.
/// - otherwise identical to `Tree::perform_access`
pub fn perform_protector_release_access(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we more typically call this "protector end access", so

Suggested change
pub fn perform_protector_release_access(
pub fn perform_protector_end_access(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Waiting for a review to complete

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants