Resolve UB in Arc/Weak interaction (2)#72533
Merged
bors merged 1 commit intorust-lang:masterfrom May 27, 2020
Merged
Conversation
Contributor
|
r? @dtolnay (rust_highfive has picked a reviewer for you, use r? to override) |
RalfJung
reviewed
May 24, 2020
RalfJung
reviewed
May 24, 2020
RalfJung
reviewed
May 24, 2020
RalfJung
reviewed
May 24, 2020
Member
That's a very clever trick, I like it. :) |
RalfJung
reviewed
May 24, 2020
e351799 to
177e098
Compare
RalfJung
reviewed
May 25, 2020
Use raw pointers to avoid making any assertions about the data field.
RalfJung
approved these changes
May 25, 2020
dtolnay
approved these changes
May 26, 2020
Member
dtolnay
left a comment
There was a problem hiding this comment.
Looks good to me as well. Thanks for the helpful round of review.
Member
|
@bors r+ |
Collaborator
|
📌 Commit ee6e705 has been approved by |
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this pull request
May 26, 2020
Resolve UB in Arc/Weak interaction (2) Use raw pointers to avoid making any assertions about the data field. Follow up from rust-lang#72479, see that PR for more detail on the motivation. @RalfJung I was able to avoid a lot of the changes to `Weak`, by making a helper type (`WeakInner`) - because of auto-deref and because the fields have the same name, the rest of the code continues to compile.
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this pull request
May 27, 2020
Resolve UB in Arc/Weak interaction (2) Use raw pointers to avoid making any assertions about the data field. Follow up from rust-lang#72479, see that PR for more detail on the motivation. @RalfJung I was able to avoid a lot of the changes to `Weak`, by making a helper type (`WeakInner`) - because of auto-deref and because the fields have the same name, the rest of the code continues to compile.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 27, 2020
Rollup of 6 pull requests Successful merges: - rust-lang#72348 (Fix confusing error message for comma typo in multiline statement) - rust-lang#72533 (Resolve UB in Arc/Weak interaction (2)) - rust-lang#72548 (Add test for old compiler ICE when using `Borrow`) - rust-lang#72606 (Small cell example update) - rust-lang#72610 (Remove font-display settings) - rust-lang#72626 (Add remark regarding DoubleEndedIterator) Failed merges: r? @ghost
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.
Use raw pointers to avoid making any assertions about the data field.
Follow up from #72479, see that PR for more detail on the motivation.
@RalfJung I was able to avoid a lot of the changes to
Weak, by making a helper type (WeakInner) - because of auto-deref and because the fields have the same name, the rest of the code continues to compile.