The Wayback Machine - https://web.archive.org/web/20210730193126/https://github.com/rust-lang/rust/pull/87268
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

@SkiFire13 SkiFire13 commented Jul 19, 2021

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

@rust-highfive rust-highfive commented Jul 19, 2021

r? @nagisa

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

@nagisa
Copy link
Contributor

@nagisa nagisa commented Jul 19, 2021

@bors r+

@bors
Copy link
Contributor

@bors bors commented Jul 19, 2021

📌 Commit 98e9d16 has been approved by nagisa

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
10 checks passed
10 checks passed
@github-actions
PR (mingw-check, ubuntu-latest-xl)
Details
@github-actions
PR (x86_64-gnu-llvm-10, ubuntu-latest-xl)
Details
@github-actions
PR (x86_64-gnu-tools, 1, ubuntu-latest-xl)
Details
@github-actions
auto
Details
@github-actions
master
Details
@github-actions
bors build finished
Details
@github-actions
bors build finished
Details
@github-actions
bors build finished
Details
@github-actions
bors build finished
Details
@rustbot rustbot added this to the 1.55.0 milestone Jul 19, 2021
@SkiFire13 SkiFire13 deleted the SkiFire13:fix-uninit-ref-list branch Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants