Avoid zeroing large stack buffers in stdio on Windows#101193
Merged
bors merged 2 commits intorust-lang:masterfrom Aug 31, 2022
Merged
Avoid zeroing large stack buffers in stdio on Windows#101193bors merged 2 commits intorust-lang:masterfrom
bors merged 2 commits intorust-lang:masterfrom
Conversation
55c0220 to
2f9bd1a
Compare
Member
Author
|
CI is green on windows (https://github.com/rust-lang/rust/runs/8089709575?check_suite_focus=true and https://github.com/rust-lang/rust/runs/8089709693?check_suite_focus=true), so I dropped the CI edit commit, and this should be reviewable. (edit: this is why I removed the t-infra label -- it was only here because I wanted to add windows to the CI temporarily) |
ChrisDenton
reviewed
Aug 30, 2022
Member
ChrisDenton
left a comment
There was a problem hiding this comment.
Looks good. Just a couple of things
Member
|
@bors r+ rollup |
Collaborator
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this pull request
Aug 30, 2022
…nton Avoid zeroing large stack buffers in stdio on Windows Does what it says on the tin, using `[MaybeUninit<u16>; N]` instead of `[0u16; N]`. These buffers seem to be around 8kb, which is big enough that this is likely to be a very nice perf boost to stdio-heavy windows code. r? `@ChrisDenton` *(Note: this PR also has a commit that adds windows to CI, but as it mentions I'll revert that after it comes out green -- I can only do a check build on the machine I'm typing this on)*
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 31, 2022
Rollup of 10 pull requests Successful merges: - rust-lang#100804 (Fix search results color on hover for ayu theme) - rust-lang#100892 (Add `AsFd` implementations for stdio types on WASI.) - rust-lang#100927 (Adding new Fuchsia rustup docs... reworking walkthrough) - rust-lang#101088 (Set DebuginfoKind::Pdb in msvc_base) - rust-lang#101159 (add tracking issue number to const_slice_split_at_not_mut) - rust-lang#101192 (Remove path string) - rust-lang#101193 (Avoid zeroing large stack buffers in stdio on Windows) - rust-lang#101197 (:arrow_up: rust-analyzer) - rust-lang#101200 (Add test for issue rust-lang#85872) - rust-lang#101219 (Update books) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Aug 31, 2022
Avoid needless buffer zeroing in `std::sys::windows::fs` Followup to rust-lang#101171 and rust-lang#101193. This finishes up avoiding buffer zeroing pointed out in rust-lang#100729 (comment) (thanks!) r? `@ChrisDenton`
workingjubilee
pushed a commit
to tcdi/postgrestd
that referenced
this pull request
Sep 15, 2022
Avoid needless buffer zeroing in `std::sys::windows::fs` Followup to rust-lang/rust#101171 and rust-lang/rust#101193. This finishes up avoiding buffer zeroing pointed out in rust-lang/rust#100729 (comment) (thanks!) r? `@ChrisDenton`
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.
Does what it says on the tin, using
[MaybeUninit<u16>; N]instead of[0u16; N]. These buffers seem to be around 8kb, which is big enough that this is likely to be a very nice perf boost to stdio-heavy windows code.r? @ChrisDenton
(Note: this PR also has a commit that adds windows to CI, but as it mentions I'll revert that after it comes out green -- I can only do a check build on the machine I'm typing this on)