Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pointer][invariant] Remove AliasingMapping, Inaccessible (#2301) #2386

Merged
merged 1 commit into from
Feb 25, 2025

Conversation

joshlf
Copy link
Member

@joshlf joshlf commented Feb 25, 2025

We previously used AliasingMappings and Inaccessible to model UnsafeCell agreement. This abuses the notion of a mapping since one doesn't ever actually want to change the aliasing of a pointer (and certainly not to Inaccessible) - really this was meant to model pointer casts which should never be performed. In addition to being an awkward fit, the presence of Inaccessible meant that code could not assume that any Aliasing invariant permitted reading, and so we had to add extra machinery to work around this.

Future commits will use a different, simpler model for denoting UnsafeCell agreement or disagreement.

While we're here, make Read slightly more permissive, implemented for A: Aliasing, T: Immutable rather than just A: Reference, T: Immutable.

Makes progress on #1122, #1866

gherrit-pr-id: I1ac2ae177a235083e33b09fc848423220d3da042

We previously used `AliasingMapping`s and `Inaccessible` to model
`UnsafeCell` agreement. This abuses the notion of a mapping since one
doesn't ever actually want to change the aliasing of a pointer (and
certainly not to `Inaccessible`) - really this was meant to model
pointer casts which should never be performed. In addition to being an
awkward fit, the presence of `Inaccessible` meant that code could not
assume that any `Aliasing` invariant permitted reading, and so we had to
add extra machinery to work around this.

Future commits will use a different, simpler model for denoting
`UnsafeCell` agreement or disagreement.

While we're here, make `Read` slightly more permissive, implemented for
`A: Aliasing, T: Immutable` rather than just `A: Reference, T:
Immutable`.

Makes progress on #1122, #1866

gherrit-pr-id: I1ac2ae177a235083e33b09fc848423220d3da042
@joshlf
Copy link
Member Author

joshlf commented Feb 25, 2025

Backporting #2301

@joshlf joshlf added this pull request to the merge queue Feb 25, 2025
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.81%. Comparing base (fb00e98) to head (868f0c0).

Additional details and impacted files
@@           Coverage Diff           @@
##           v0.8.x    #2386   +/-   ##
=======================================
  Coverage   87.81%   87.81%           
=======================================
  Files          17       17           
  Lines        6195     6195           
=======================================
  Hits         5440     5440           
  Misses        755      755           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Merged via the queue into v0.8.x with commit 47949a4 Feb 25, 2025
87 checks passed
@joshlf joshlf deleted the v0.8.x-2301 branch February 25, 2025 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants