Skip to content

[pointer] Ptr::iter takes self by value#3421

Open
joshlf wants to merge 1 commit into
mainfrom
Ibb7d512d9e12ecfd118bb018bcae10d17279c2ed
Open

[pointer] Ptr::iter takes self by value#3421
joshlf wants to merge 1 commit into
mainfrom
Ibb7d512d9e12ecfd118bb018bcae10d17279c2ed

Conversation

@joshlf
Copy link
Copy Markdown
Member

@joshlf joshlf commented May 28, 2026

This fixes a prior soundness hole - Ptr::iter took &self, permitting
multiple overlapping Exclusive Ptrs to be created at the same time.

In CI, when running cargo-semver-checks, don't pass --cfg zerocopy_unstable_ptr, as we don't want to semver-check unstable APIs.

Release 0.8.50.

Fixes #3419


Latest Update: v3 — Compare vs v2

📚 Full Patch History

Links show the diff between the row version and the column version.

Version v2 v1 Base
v3 vs v2 vs v1 vs Base
v2 vs v1 vs Base
v1 vs Base
⬇️ Download this PR

Branch

git fetch origin refs/heads/Ibb7d512d9e12ecfd118bb018bcae10d17279c2ed && git checkout -b pr-Ibb7d512d9e12ecfd118bb018bcae10d17279c2ed FETCH_HEAD

Checkout

git fetch origin refs/heads/Ibb7d512d9e12ecfd118bb018bcae10d17279c2ed && git checkout FETCH_HEAD

Cherry Pick

git fetch origin refs/heads/Ibb7d512d9e12ecfd118bb018bcae10d17279c2ed && git cherry-pick FETCH_HEAD

Pull

git pull origin refs/heads/Ibb7d512d9e12ecfd118bb018bcae10d17279c2ed

Stacked PRs enabled by GHerrit.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.85%. Comparing base (5fc5d5b) to head (eaec844).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3421      +/-   ##
==========================================
+ Coverage   91.84%   91.85%   +0.01%     
==========================================
  Files          20       20              
  Lines        6080     6093      +13     
==========================================
+ Hits         5584     5597      +13     
  Misses        496      496              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This fixes a prior soundness hole - `Ptr::iter` took `&self`, permitting
multiple overlapping `Exclusive` `Ptr`s to be created at the same time.

In CI, when running `cargo-semver-checks`, don't pass `--cfg
zerocopy_unstable_ptr`, as we don't want to semver-check unstable APIs.

Release 0.8.50.

Fixes #3419

gherrit-pr-id: Ibb7d512d9e12ecfd118bb018bcae10d17279c2ed
@joshlf joshlf force-pushed the Ibb7d512d9e12ecfd118bb018bcae10d17279c2ed branch from a108b90 to eaec844 Compare May 28, 2026 19:40
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.

Ptr::iter allows creating aliasing exclusive Ptrs, leading to mutable reference aliasing

2 participants