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

Don't create references to uninitialized data in List::from_arena #87268

Merged
merged 1 commit into from
Jul 19, 2021

Conversation

SkiFire13
Copy link
Contributor

Previously result and arena_slice were references pointing to uninitialized data, which is technically UB. They may have been fine because the pointed data is Copy and and they were only written to, but the semantics of this aren't clearly defined yet, and since we have a sound way to do the same thing I don't think we should keep the possibly-unsound way.

@rust-highfive
Copy link
Collaborator

r? @nagisa

(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 Jul 19, 2021
@nagisa
Copy link
Member

nagisa commented Jul 19, 2021

@bors r+

@bors
Copy link
Contributor

bors commented Jul 19, 2021

📌 Commit 98e9d16 has been approved by nagisa

@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 Jul 19, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 19, 2021
…laumeGomez

Rollup of 8 pull requests

Successful merges:

 - rust-lang#86230 (Add --nocapture option to rustdoc)
 - rust-lang#87210 (Rustdoc accessibility: make the sidebar headers actual headers)
 - rust-lang#87227 (Move asm! and global_asm! to core::arch)
 - rust-lang#87236 (Simplify command-line argument initialization on unix)
 - rust-lang#87251 (Fix "item info" width)
 - rust-lang#87256 (Extend HIR-based WF checking to associated type defaults)
 - rust-lang#87259 (triagebot shortcut config)
 - rust-lang#87268 (Don't create references to uninitialized data in `List::from_arena`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 6cb69ea into rust-lang:master Jul 19, 2021
@rustbot rustbot added this to the 1.55.0 milestone Jul 19, 2021
@SkiFire13 SkiFire13 deleted the fix-uninit-ref-list branch July 19, 2021 13:03
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants