Prevent specialized ZipImpl from calling __iterator_get_unchecked twice with the same index#82292
Merged
bors merged 2 commits intorust-lang:masterfrom Mar 7, 2021
Merged
Conversation
Contributor
|
r? @m-ou-se (rust-highfive has picked a reviewer for you, use r? to override) |
m-ou-se
reviewed
Mar 3, 2021
Member
m-ou-se
left a comment
There was a problem hiding this comment.
Looks good to me. Can you resolve the merge conflict?
bdf0a3c to
2432f75
Compare
Contributor
Author
|
@rustbot label -S-waiting-on-author +S-waiting-on-review |
Contributor
Author
Collaborator
|
☔ The latest upstream changes (presumably #82795) made this pull request unmergeable. Please resolve the merge conflicts. |
…e with the same index after calling next_back
2432f75 to
c1bfb9a
Compare
Contributor
Author
|
Merge conflict solved, this should be ready for review/merge now. TIL there's an S-blocked label. @rustbot label -S-blocked +S-waiting-on-review |
Member
|
Thanks! @bors r+ |
Collaborator
|
📌 Commit c1bfb9a has been approved by |
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this pull request
Mar 6, 2021
Prevent specialized ZipImpl from calling `__iterator_get_unchecked` twice with the same index Fixes rust-lang#82291 It's open for review, but conflicts with rust-lang#82289, wait before merging. The conflict involves only the new test, so it should be rather trivial to fix.
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this pull request
Mar 6, 2021
Prevent specialized ZipImpl from calling `__iterator_get_unchecked` twice with the same index Fixes rust-lang#82291 It's open for review, but conflicts with rust-lang#82289, wait before merging. The conflict involves only the new test, so it should be rather trivial to fix.
m-ou-se
added a commit
to m-ou-se/rust
that referenced
this pull request
Mar 6, 2021
Prevent specialized ZipImpl from calling `__iterator_get_unchecked` twice with the same index Fixes rust-lang#82291 It's open for review, but conflicts with rust-lang#82289, wait before merging. The conflict involves only the new test, so it should be rather trivial to fix.
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this pull request
Mar 6, 2021
Prevent specialized ZipImpl from calling `__iterator_get_unchecked` twice with the same index Fixes rust-lang#82291 It's open for review, but conflicts with rust-lang#82289, wait before merging. The conflict involves only the new test, so it should be rather trivial to fix.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 7, 2021
Rollup of 13 pull requests Successful merges: - rust-lang#77916 (Change built-in kernel targets to be os = none throughout) - rust-lang#82130 (Make some Option, Result methods unstably const) - rust-lang#82292 (Prevent specialized ZipImpl from calling `__iterator_get_unchecked` twice with the same index) - rust-lang#82402 (Remove RefCell around `module_trait_cache`) - rust-lang#82592 (Improve transmute docs with further clarifications) - rust-lang#82651 (Cleanup rustdoc warnings) - rust-lang#82720 (Fix diagnostic suggests adding type `[type error]`) - rust-lang#82751 (improve offset_from docs) - rust-lang#82793 (Move some tests to more suitable subdirs) - rust-lang#82803 (rustdoc: Add an unstable option to print all unversioned files) - rust-lang#82808 (Sync rustc_codegen_cranelift) - rust-lang#82822 (Fix typo) - rust-lang#82837 (tweak MaybeUninit docs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
the8472
added a commit
to the8472/rust
that referenced
this pull request
May 16, 2025
Some history: The Zip TrustedRandomAccess specialization has tried to emulate the side-effects of the naive implementation for a long time, including backwards iteration. rust-lang#82292 tried to fix unsoundness (rust-lang#82291) in that side-effect-preservation code, but this introduced some panic-safety unsoundness (rust-lang#86443), but the fix rust-lang#86452 didn't fix it for nested Zip iterators (rust-lang#137255). Rather than piling yet another fix ontop of this heap of fixes this PR reduces the number of cases in which side-effects will be preserved; the necessary API guarantee change was approved in rust-lang#83791 but we haven't made use of that so far.
the8472
added a commit
to the8472/rust
that referenced
this pull request
May 16, 2025
Some history: The Zip TrustedRandomAccess specialization has tried to emulate the side-effects of the naive implementation for a long time, including backwards iteration. rust-lang#82292 tried to fix unsoundness (rust-lang#82291) in that side-effect-preservation code, but this introduced some panic-safety unsoundness (rust-lang#86443), but the fix rust-lang#86452 didn't fix it for nested Zip iterators (rust-lang#137255). Rather than piling yet another fix ontop of this heap of fixes this PR reduces the number of cases in which side-effects will be preserved; the necessary API guarantee change was approved in rust-lang#83791 but we haven't made use of that so far.
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Jul 19, 2025
…orkingjubilee fix Zip unsoundness (again) Some history: The Zip TrustedRandomAccess specialization has tried to emulate the side-effects of the naive implementation for a long time, including backwards iteration. rust-lang#82292 tried to fix unsoundness (rust-lang#82291) in that side-effect-preservation code, but this introduced some panic-safety unsoundness (rust-lang#86443), but the fix rust-lang#86452 didn't fix it for nested Zip iterators (rust-lang#137255). Rather than piling yet another fix ontop of this heap of fixes this PR reduces the number of cases in which side-effects will be preserved; the necessary API guarantee change was approved in rust-lang#83791 but we haven't made use of that so far. fixes rust-lang#137255
rust-timer
added a commit
that referenced
this pull request
Jul 19, 2025
Rollup merge of #141076 - the8472:fix-zip-panic-safety2, r=workingjubilee fix Zip unsoundness (again) Some history: The Zip TrustedRandomAccess specialization has tried to emulate the side-effects of the naive implementation for a long time, including backwards iteration. #82292 tried to fix unsoundness (#82291) in that side-effect-preservation code, but this introduced some panic-safety unsoundness (#86443), but the fix #86452 didn't fix it for nested Zip iterators (#137255). Rather than piling yet another fix ontop of this heap of fixes this PR reduces the number of cases in which side-effects will be preserved; the necessary API guarantee change was approved in #83791 but we haven't made use of that so far. fixes #137255
Muscraft
pushed a commit
to Muscraft/rust
that referenced
this pull request
Jul 21, 2025
…orkingjubilee fix Zip unsoundness (again) Some history: The Zip TrustedRandomAccess specialization has tried to emulate the side-effects of the naive implementation for a long time, including backwards iteration. rust-lang#82292 tried to fix unsoundness (rust-lang#82291) in that side-effect-preservation code, but this introduced some panic-safety unsoundness (rust-lang#86443), but the fix rust-lang#86452 didn't fix it for nested Zip iterators (rust-lang#137255). Rather than piling yet another fix ontop of this heap of fixes this PR reduces the number of cases in which side-effects will be preserved; the necessary API guarantee change was approved in rust-lang#83791 but we haven't made use of that so far. fixes rust-lang#137255
github-actions bot
pushed a commit
to model-checking/verify-rust-std
that referenced
this pull request
Jul 29, 2025
…orkingjubilee fix Zip unsoundness (again) Some history: The Zip TrustedRandomAccess specialization has tried to emulate the side-effects of the naive implementation for a long time, including backwards iteration. rust-lang#82292 tried to fix unsoundness (rust-lang#82291) in that side-effect-preservation code, but this introduced some panic-safety unsoundness (rust-lang#86443), but the fix rust-lang#86452 didn't fix it for nested Zip iterators (rust-lang#137255). Rather than piling yet another fix ontop of this heap of fixes this PR reduces the number of cases in which side-effects will be preserved; the necessary API guarantee change was approved in rust-lang#83791 but we haven't made use of that so far. fixes rust-lang#137255
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #82291
It's open for review, but conflicts with #82289, wait before merging. The conflict involves only the new test, so it should be rather trivial to fix.