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

Mark Arc::from_inner / Rc::from_inner as unsafe #89741

Merged
merged 1 commit into from
Nov 21, 2021

Conversation

sdroege
Copy link
Contributor

@sdroege sdroege commented Oct 10, 2021

While it's an internal function, it is easy to create invalid Arc/Rcs to
a dangling pointer with it.

Fixes #89740

While it's an internal function, it is easy to create invalid Arc/Rcs to
a dangling pointer with it.

Fixes rust-lang#89740
@rust-highfive
Copy link
Collaborator

r? @yaahc

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 10, 2021
@the8472 the8472 added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Oct 11, 2021
@JohnCSimon JohnCSimon added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 31, 2021
@Mark-Simulacrum
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Nov 20, 2021

📌 Commit 2e2c38e has been approved by Mark-Simulacrum

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 20, 2021
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 20, 2021
…=Mark-Simulacrum

Mark `Arc::from_inner` / `Rc::from_inner` as unsafe

While it's an internal function, it is easy to create invalid Arc/Rcs to
a dangling pointer with it.

Fixes rust-lang#89740
This was referenced Nov 20, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 20, 2021
…askrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#89741 (Mark `Arc::from_inner` / `Rc::from_inner` as unsafe)
 - rust-lang#90927 (Fix float ICE)
 - rust-lang#90994 (Fix ICE `rust-lang#90993`: add missing call to cancel)
 - rust-lang#91018 (Adopt let_else in more places in rustc_mir_build)
 - rust-lang#91022 (Suggest `await` in more situations where infer types are involved)
 - rust-lang#91088 (Revert "require full validity when determining the discriminant of a value")

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 09d9c09 into rust-lang:master Nov 21, 2021
@rustbot rustbot added this to the 1.58.0 milestone Nov 21, 2021
@sdroege sdroege deleted the arc-rc-from-inner-unsafe branch November 21, 2021 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Arc::from_inner / Rc::from_inner should probably be marked unsafe
8 participants