-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Avoid zeroing a 1kb stack buffer on every call to std::sys::windows::fill_utf16_buf
#100729
Conversation
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
13ca35f
to
f50f878
Compare
FYI: I wrote this on macOS, so probably don't r+ this without a try run first (it should be fine but for all I know I got some logic backwards or something). |
Well it doesn't look like there's anything in the try queue atm so we might as well use it for something... @bors try |
⌛ Trying commit f50f878 with merge d286d96ed7aad502865c5797ecb8c6c49237bb5f... |
Try builds are Linux only dist builds without extra work so it probably won't show anything interesting. |
Nards. I was pretty sure I'd seen them run the windows CI tests before. |
Oh! That's annoying. If it helps I can test locally when I have a mo. |
https://github.com/rust-lang/rust/blob/master/.github/workflows/ci.yml#L7 has the file you need to edit and rerun the expander to regenerate the actual configuration. Mostly just a matter of copying a windows job to the try: section. |
There few similar places like that rust/library/std/src/sys/windows/stdio.rs Line 60 in 8064a49
rust/library/std/src/sys/windows/stdio.rs Lines 171 to 173 in 8064a49
or rust/library/std/src/sys/windows/c.rs Line 158 in 8064a49
rust/library/std/src/sys/windows/fs.rs Lines 328 to 330 in 8064a49
|
☀️ Try build successful - checks-actions |
Ok I've tested this locally and it looks great so let's get this merged. @bors r+ rollup |
@bors r- update comments |
@bors r+ rollup |
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#100186 (Mention `as_mut` alongside `as_ref` in borrowck error message) - rust-lang#100383 (Mitigate stale data reads on SGX platform) - rust-lang#100507 (suggest `once_cell::Lazy` for non-const statics) - rust-lang#100617 (Suggest the right help message for as_ref) - rust-lang#100667 (Migrate "invalid variable declaration" errors to SessionDiagnostic) - rust-lang#100709 (Migrate typeck's `used` expected symbol diagnostic to `SessionDiagnostic`) - rust-lang#100723 (Add the diagnostic translation lints to crates that don't emit them) - rust-lang#100729 (Avoid zeroing a 1kb stack buffer on every call to `std::sys::windows::fill_utf16_buf`) - rust-lang#100750 (improved diagnostic for function defined with `def`, `fun`, `func`, or `function` instead of `fn`) - rust-lang#100763 (triagebot: Autolabel `A-rustdoc-json`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
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`
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`
I've also tried to be slightly more careful about integer overflows, although in practice this is likely still not handled ideally.
r? @ChrisDenton