-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
std: Fix over-aligned allocations on wasm32-wasi #70585
Merged
Merged
Conversation
This file contains 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
The wasm32-wasi target delegates its malloc implementation to the functions in wasi-libc, but the invocation of `aligned_alloc` was incorrect by passing the number of bytes requested first rather than the alignment. This commit swaps the order of these two arguments to ensure that we allocate over-aligned memory correctly.
@bors r+ Good catch! |
📌 Commit ab2998b has been approved by |
bors
added
the
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
label
Mar 30, 2020
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this pull request
Mar 30, 2020
…r=Mark-Simulacrum std: Fix over-aligned allocations on wasm32-wasi The wasm32-wasi target delegates its malloc implementation to the functions in wasi-libc, but the invocation of `aligned_alloc` was incorrect by passing the number of bytes requested first rather than the alignment. This commit swaps the order of these two arguments to ensure that we allocate over-aligned memory correctly.
⌛ Testing commit ab2998b with merge d73c6c7eac33504dae1cffc4af55de7a882b65f2... |
💔 Test failed - checks-azure |
bors
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Mar 30, 2020
@bors retry - curl: (56) OpenSSL SSL_read: Connection was reset, errno 10054 |
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
Mar 30, 2020
⌛ Testing commit ab2998b with merge cacdc55fb9ca5b28c68b2bd2e3e97ba96f910f9c... |
💔 Test failed - checks-azure |
bors
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Mar 30, 2020
@bors retry |
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
Mar 31, 2020
Centril
added a commit
to Centril/rust
that referenced
this pull request
Mar 31, 2020
…r=Mark-Simulacrum std: Fix over-aligned allocations on wasm32-wasi The wasm32-wasi target delegates its malloc implementation to the functions in wasi-libc, but the invocation of `aligned_alloc` was incorrect by passing the number of bytes requested first rather than the alignment. This commit swaps the order of these two arguments to ensure that we allocate over-aligned memory correctly.
Centril
added a commit
to Centril/rust
that referenced
this pull request
Mar 31, 2020
…r=Mark-Simulacrum std: Fix over-aligned allocations on wasm32-wasi The wasm32-wasi target delegates its malloc implementation to the functions in wasi-libc, but the invocation of `aligned_alloc` was incorrect by passing the number of bytes requested first rather than the alignment. This commit swaps the order of these two arguments to ensure that we allocate over-aligned memory correctly.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 31, 2020
Rollup of 9 pull requests Successful merges: - rust-lang#69784 (Optimize strip_prefix and strip_suffix with str patterns) - rust-lang#70548 (Add long error code for error E0226) - rust-lang#70555 (resolve, `try_resolve_as_non_binding`: use `delay_span_bug` due to parser recovery) - rust-lang#70561 (remove obsolete comment) - rust-lang#70562 (infer array len from pattern) - rust-lang#70585 (std: Fix over-aligned allocations on wasm32-wasi) - rust-lang#70587 (Add `Rust` to the code snippet) - rust-lang#70588 (Fix incorrect documentation for `str::{split_at, split_at_mut}`) - rust-lang#70613 (more clippy fixes) Failed merges: r? @ghost
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.
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.
The wasm32-wasi target delegates its malloc implementation to the
functions in wasi-libc, but the invocation of
aligned_alloc
wasincorrect by passing the number of bytes requested first rather than the
alignment. This commit swaps the order of these two arguments to ensure
that we allocate over-aligned memory correctly.