-
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 3 pull requests #70676
Rollup of 3 pull requests #70676
Commits on Mar 22, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 4582c14 - Browse repository at this point
Copy the full SHA 4582c14View commit details
Commits on Mar 31, 2020
-
Make the rustc respect the
-C codegen-units
flag in incremental mode.Before this commit `-C codegen-units` would just get silently be ignored if `-C incremental` was specified too. After this commit one can control the number of codegen units generated during incremental compilation. The default is rather high at 256, so most crates won't see a difference unless explicitly opting into a lower count.
Configuration menu - View commit details
-
Copy full SHA for 1e5b459 - Browse repository at this point
Copy the full SHA 1e5b459View commit details -
Configuration menu - View commit details
-
Copy full SHA for 408e6e3 - Browse repository at this point
Copy the full SHA 408e6e3View commit details -
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 -
Configuration menu - View commit details
-
Copy full SHA for 98ead3e - Browse repository at this point
Copy the full SHA 98ead3eView 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 -
Rollup merge of rust-lang#70156 - michaelwoerister:incr-cgus, r=nikom…
…atsakis Make the rustc respect the `-C codegen-units` flag in incremental mode. This PR implements (the as of yet unapproved) major change proposal at rust-lang/compiler-team#245. See the description there for background and rationale. The changes are pretty straightforward and should be easy to rebase if the proposal gets accepted at some point. r? @nikomatsakis cc @pnkfelix
Configuration menu - View commit details
-
Copy full SHA for d4a0f7e - Browse repository at this point
Copy the full SHA d4a0f7eView commit details -
Rollup merge of rust-lang#70281 - xfix:infallible-hash, r=dtolnay
Implement Hash for Infallible https://www.reddit.com/r/rust/comments/fmllgx/never_crate_stable_alternative_to/ lists not implementing `Hash` as a reason for the `never` crate. I see no reason not to implement `Hash` for `Infallible`, so might as well do it. No changes necessary for `!`, because `!` already implements `Hash` (see rust-lang#51404).
Configuration menu - View commit details
-
Copy full SHA for a03fe9e - Browse repository at this point
Copy the full SHA a03fe9eView commit details -
Rollup merge of rust-lang#70597 - vakaras:thread_new_double_free_bug_…
…fix, r=Amanieu 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 1cdf210 - Browse repository at this point
Copy the full SHA 1cdf210View commit details