-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 6 pull requests #39694
Rollup of 6 pull requests #39694
Conversation
frewsxcv
commented
Feb 9, 2017
- Successful merges: Unignore u128 test for stage 0,1 #39604, Choose different name for metadata obj-file to avoid clashes with user-chosen names. #39619, Fix mailmap for @gifnksm #39670, Exclude top-level macro expansions from source location override. #39678, Fix unsafe unaligned loads in test. #39682, Fix unaligned load in librustc_metadata::index. #39683
- Failed merges:
Even more SNAP cleanup.
Unignore u128 test for stage 0,1 Even more SNAP cleanup. Follow-up of rust-lang#39519. Sorry, I didn't check twice.
…ata, r=alexcrichton Choose different name for metadata obj-file to avoid clashes with user-chosen names. Fixes rust-lang#39585 and probably rust-lang#39508. Incremental compilation assigns different names to obj-files than regular compilation. If a crate is called "metadata" this can lead to a clash between the root module's obj-file and the obj-file containing crate-metadata. This PR assigns a name to the metadata obj-file that cannot clash with other obj-file because it contains a `.` which is not allowed in a Rust module identifier. r? @alexcrichton cc @nikomatsakis
…=steveklabnik Fix mailmap for @gifnksm cc rust-lang-nursery/thanks#71
…erister Exclude top-level macro expansions from source location override. It occurred to me that a simple heuristic can address the issue rust-lang#36382: any macros that expand into items (including `include!()`) don't need to be stepped over because there's not code to step through above a function scope level. r? @michaelwoerister
Fix unsafe unaligned loads in test. r? @eddyb cc @Aatch @nikomatsakis The `#[derive(PartialEq, Debug)]` impls on a packed struct contain undefined behaviour. Both generated impls take references to unaligned fields, which will fail to compile once we correctly treat that as unsafe (see rust-lang#27060). This UB was found by running the test under [Miri](https://github.com/solson/miri/) which rejects these unsafe unaligned loads. 😄 Here's a simpler example: ```rust struct Packed { a: u8, b: u64, } ``` It expands to: ```rust fn fmt(&self, __arg_0: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { match *self { Packed { a: ref __self_0_0, b: ref __self_0_1 } => { // BAD: these patterns are unsafe let mut builder = __arg_0.debug_struct("Packed"); let _ = builder.field("a", &&(*__self_0_0)); let _ = builder.field("b", &&(*__self_0_1)); builder.finish() } } } ``` and ```rust fn eq(&self, __arg_0: &Packed) -> bool { match *__arg_0 { Packed { a: ref __self_1_0, b: ref __self_1_1 } => // BAD: these patterns are unsafe match *self { Packed { a: ref __self_0_0, b: ref __self_0_1 } => // BAD: these patterns are unsafe true && (*__self_0_0) == (*__self_1_0) && (*__self_0_1) == (*__self_1_1), }, } } ```
…metadata, r=bluss Fix unaligned load in librustc_metadata::index. The derived `Clone` impl contains UB and will be unsafe when we fix rust-lang#27060. See [this comment](rust-lang#27060 (comment)) for more context. r? @bluss
@bors r+ p=10 |
📌 Commit 55c17a5 has been approved by |
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @pnkfelix (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
⌛ Testing commit 55c17a5 with merge 24a70eb... |
☀️ Test successful - status-appveyor, status-travis |