-
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
Rollup of 8 pull requests #70711
Rollup of 8 pull requests #70711
Commits on Mar 29, 2020
-
Stabilize float::to_int_unchecked
This renames and stabilizes unsafe floating point to integer casts, which are intended to be the substitute for the currently unsound `as` behavior, once that changes to safe-but-slower saturating casts.
Configuration menu - View commit details
-
Copy full SHA for 5614721 - Browse repository at this point
Copy the full SHA 5614721View commit details
Commits on Mar 31, 2020
-
Fix double-free and undefined behaviour in libstd::syn::unix::Thread:…
…:new.
Vytautas Astrauskas committedMar 31, 2020 Configuration menu - View commit details
-
Copy full SHA for 64e5327 - Browse repository at this point
Copy the full SHA 64e5327View commit details -
Inline start_thread into its callers.
Vytautas Astrauskas committedMar 31, 2020 Configuration menu - View commit details
-
Copy full SHA for 753bc7d - Browse repository at this point
Copy the full SHA 753bc7dView commit details
Commits on Apr 1, 2020
-
Use Box::into_raw instead of ManuallyDrop in Thread::new.
Vytautas Astrauskas committedApr 1, 2020 Configuration menu - View commit details
-
Copy full SHA for 5382347 - Browse repository at this point
Copy the full SHA 5382347View commit details -
In Thread::new, add a comment that a panic could cause a memory leak.
Vytautas Astrauskas committedApr 1, 2020 Configuration menu - View commit details
-
Copy full SHA for baa6d55 - Browse repository at this point
Copy the full SHA baa6d55View commit details
Commits on Apr 2, 2020
-
Configuration menu - View commit details
-
Copy full SHA for f87afec - Browse repository at this point
Copy the full SHA f87afecView commit details -
Remove unused discriminant reads from MIR bodies
Allow the `SimplifyLocals` pass to remove reads of discriminants if the read is never used.
Configuration menu - View commit details
-
Copy full SHA for 75e2e8c - Browse repository at this point
Copy the full SHA 75e2e8cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0b61239 - Browse repository at this point
Copy the full SHA 0b61239View commit details -
Remove stack overflow handler stub for wasm.
Vytautas Astrauskas committedApr 2, 2020 Configuration menu - View commit details
-
Copy full SHA for ec8275c - Browse repository at this point
Copy the full SHA ec8275cView commit details -
Remove unnecessary intermediate pointer cast in Thread::new.
Vytautas Astrauskas committedApr 2, 2020 Configuration menu - View commit details
-
Copy full SHA for 1c1bd95 - Browse repository at this point
Copy the full SHA 1c1bd95View commit details -
Configuration menu - View commit details
-
Copy full SHA for 65fcc3f - Browse repository at this point
Copy the full SHA 65fcc3fView commit details -
Configuration menu - View commit details
-
Copy full SHA for e992565 - Browse repository at this point
Copy the full SHA e992565View commit details -
Configuration menu - View commit details
-
Copy full SHA for 354ddbf - Browse repository at this point
Copy the full SHA 354ddbfView commit details -
Rollup merge of rust-lang#70487 - Mark-Simulacrum:float-unchecked-cas…
…ts, r=SimonSapin Stabilize float::to_int_unchecked This renames and stabilizes unsafe floating point to integer casts, which are intended to be the substitute for the currently unsound `as` behavior, once that changes to safe-but-slower saturating casts. As such, I believe this also likely unblocks rust-lang#10184 (our oldest I-unsound issue!), as once this rolls out to stable it would be far easier IMO to change the behavior of `as` to be safe by default. This does not stabilize the trait or the associated method, as they are deemed internal implementation details (and consumers should not, generally, want to expose them, as in practice all callers likely know statically/without generics what the return type is). Closes rust-lang#67058
Configuration menu - View commit details
-
Copy full SHA for 29b3739 - Browse repository at this point
Copy the full SHA 29b3739View commit details -
Rollup merge of rust-lang#70595 - wesleywiser:remove_unused_discrimin…
…ant_reads, r=oli-obk Remove unused discriminant reads from MIR bodies Allow the `SimplifyLocals` pass to remove reads of discriminants if the read is never used. Fixes rust-lang#70531 r? @oli-obk
Configuration menu - View commit details
-
Copy full SHA for b205742 - Browse repository at this point
Copy the full SHA b205742View commit details -
Rollup merge of rust-lang#70597 - vakaras:thread_new_double_free_bug_…
…fix, r=Amanieu,RalfJung Fix double-free and undefined behaviour in libstd::syn::unix::Thread::new While working on concurrency support for Miri, I found that the `libstd::syn::unix::Thread::new` method has two potential problems: double-free and undefined behaviour. **Double-free** could occur if the following events happened (credit for pointing this out goes to @RalfJung): 1. The call to `pthread_create` successfully launched a new thread that executed to completion and deallocated `p`. 2. The call to `pthread_attr_destroy` returned a non-zero value causing the `assert_eq!` to panic. 3. Since `mem::forget(p)` was not yet executed, the destructor of `p` would be executed and cause a double-free. As far as I understand, this code also violates the stacked-borrows aliasing rules and thus would result in **undefined behaviour** if these rules were adopted. The problem is that the ownership of `p` is passed to the newly created thread before the call to `mem::forget`. Since the call to `mem::forget` is still a call, it counts as a use of `p` and triggers UB. This pull request changes the code to use `mem::ManuallyDrop` instead of `mem::forget`. As a consequence, in case of a panic, `p` would be potentially leaked, which while undesirable is probably better than double-free or undefined behaviour.
Configuration menu - View commit details
-
Copy full SHA for 7ba229f - Browse repository at this point
Copy the full SHA 7ba229fView commit details -
Rollup merge of rust-lang#70691 - TimDiekmann:allocref-docs, r=RalfJung
Improve docs in `AllocRef` r? @RalfJung
Configuration menu - View commit details
-
Copy full SHA for 921dcaf - Browse repository at this point
Copy the full SHA 921dcafView commit details -
Rollup merge of rust-lang#70694 - lzutao:self, r=Centril
Use Self over specific type in return position
Configuration menu - View commit details
-
Copy full SHA for 8827750 - Browse repository at this point
Copy the full SHA 8827750View commit details -
Rollup merge of rust-lang#70698 - nikomatsakis:x-py-json-output, r=Ma…
…rk-Simulacrum bootstrap: add `--json-output` for rust-analyzer Motivation is that this allows us to customize rust-analyzer's "cargo watch" integration to run x.py. You simply have to set the command to run to be `x.py --json-output` r? @Mark-Simulacrum -- feel free to make changes, this is quick and dirty for sure
Configuration menu - View commit details
-
Copy full SHA for d644a24 - Browse repository at this point
Copy the full SHA d644a24View commit details -
Rollup merge of rust-lang#70700 - jrvidal:include-macro-paths, r=Dyla…
…n-DPC Expand on platform details of `include_xxx` macros This is a small detail that is not explicitly mentioned, but it left me scratching my head for a while until I looked into its implementation details. Maybe worth mentioning.
Configuration menu - View commit details
-
Copy full SHA for 8a8abc6 - Browse repository at this point
Copy the full SHA 8a8abc6View commit details -
Rollup merge of rust-lang#70708 - Pocakking:fix-ascii-case-conv-typo,…
… r=sfackler Fix typo in u8::to_ascii_uppercase and u8::to_ascii_lowercase Corrects misspelling of fifth.
Configuration menu - View commit details
-
Copy full SHA for 6436059 - Browse repository at this point
Copy the full SHA 6436059View commit details