Skip to content
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 15 pull requests #55357

Closed
wants to merge 43 commits into from
Closed

Conversation

pietroalbini
Copy link
Member

Successful merges:

Failed merges:

r? @ghost

alexcrichton and others added 30 commits September 27, 2018 16:53
This commit is a fix for rust-lang#54408 where on nightly right now whenever
generics are inlined the path name listed for the inlined function's
debuginfo is a relative path to the cwd, which surely doesn't exist!
Previously on beta/stable the debuginfo mentioned an absolute path which
still didn't exist, but more predictably didn't exist.

The change between stable/nightly is that nightly is now compiled with
`--remap-path-prefix` to give a deterministic prefix to all
rustc-generated paths in debuginfo. By using `--remap-path-prefix` the
previous logic would recognize that the cwd was remapped, causing the
original relative path name of the standard library to get emitted. If
`--remap-path-prefix` *wasn't* passed in then the logic would create an
absolute path name and then create a new source file entry.

The fix in this commit is to apply the "recreate the source file entry
with an absolute path" logic a bit more aggresively. If the source
file's name was remapped then we don't touch it, but otherwise we always
take the working dir (which may have been remapped) and then join it to
the file to ensure that we process all relative file names as well.

The end result is that the standard library should have an absolute path
for all file names in debuginfo (using our `--remap-path-prefix`
argument) as it does on stable after this patch.

Closes rust-lang#54408
The old test was supposed to check for proper html escaping when showing the
contents of constants. This was changed as part of rust-lang#53409. The revised test
asserts that the contents of the constant is not shown as part of the generated
documentation.
"Run" links to the playground are not added to the generated documentation if
the unstable `--playground-url` argument is not passed to rustdoc. Therefore,
without specifying `--playground-url` as a compile-flag, the test doesn't
correctly assert that `#![doc(html_playground_url = "")]` removes playground
links.
The `@!has` command does not support specifying just a PATH and an XPATH. That
means that the previous test searched for the literal string
`//h2[@id="implementations"]` within the generated output, which obviously
didn't exist. Even after adding a trait implementation, the test still passed.
The correct way to check for the existence of a DOM element with the id
`implementations` is to use the `@count` keyword.
Struct names are no longer encapsulated in `<code>` tags, which meant that the
test was not correctly verifying that it wasn't being show. I've also added a
check to make sure the documentation page for the redirect::Qux struct is not
generated at all.
The Auto Trait Implementation section is not wrapped in a
`synthetic-implementations` class. In fact, it is wrapped in a
`synthetic-implementations` id. However, we can generalize and completely remove
the `synthetic-implementations` requirement. We just have to verify that there's
no mention of "Auto Trait Implementations" anywhere.
The generated code would look like `<code>impl <a href="...">Foo</a></code>`
which the plain text matcher doesn't match. But by using the XPATH notation, the
nodes are flattened and we can correctly assert that `impl Foo` does not occur
in the generated docs.
The link that is matched against is not the same as would be generated by
rustdoc. We should also check that the `foo/private` directory is not generated
at all.
The function is called `fn_def_with_doc`, not `fn_def_with`.
…e not quite rvalues

(and of course they are not quite statics either).

Namely, they *do* have a restricted region (like rvalues), but they
also cannot be moved out of (like statics).
This commit removes all jemalloc related submodules, configuration, etc,
from the bootstrap, from the standard library, and from the compiler.
This will be followed up with a change to use jemalloc specifically as
part of rustc on blessed platforms.
This commit adds opt-in support to the compiler to link to `jemalloc` in
the compiler. When activated the compiler will depend on `jemalloc-sys`,
instruct jemalloc to unprefix its symbols, and then link to it. The
feature is activated by default on Linux/OSX compilers for x86_64/i686
platforms, and it's not enabled anywhere else for now. We may be able to
opt-in other platforms in the future! Also note that the opt-in only
happens on CI, it's otherwise unconditionally turned off by default.

Closes rust-lang#36963
`compute_missing_ctors` is called a lot. It produces a vector, which can
be reasonably large (e.g. 100+ elements), but the vector is almost
always only checked for emptiness.

This commit changes `compute_missing_ctors` so it can be called in a
cheap way that just indicates if the vector would be empty. If
necessary, the function can subsequently be called in an expensive way
to compute the full vector.

This change reduces instruction counts for several benchmarks up to 2%.
This changes debuginfo generation to add template parameters to
generic types.  With this change the DWARF now has
DW_TAG_template_type_param for types, not just for functions, like:

 <2><40d>: Abbrev Number: 6 (DW_TAG_structure_type)
    <40e>   DW_AT_name        : (indirect string, offset: 0x375): Generic<i32>
    <412>   DW_AT_byte_size   : 4
    <413>   DW_AT_alignment   : 4
...
 <3><41f>: Abbrev Number: 8 (DW_TAG_template_type_param)
    <420>   DW_AT_type        : <0x42a>
    <424>   DW_AT_name        : (indirect string, offset: 0xa65e): T

Closes rust-lang#9224
When inlining a function using the Mir inliner, we shouldn't rerun the
various Mir passes on it because the Mir has already been lowered and
that wil break various early Mir passes.

The issue in rust-lang#50411 is that we've inlined a function with promotions
whose Mir has already been lowered. The promotions are then copied into
the local function and we begin to run passes on their lowered Mir
which causes the ICE.

Fixes rust-lang#50411
This can be obtained via the `$mir_phase` value.
As suggested in the feedback for rust-lang#55244.

When I replaced the macro with a function, rustc started complaining
that there were two unused functions so I also removed those.
We're gonna link to nightly as this didn't make it into the corresponding stable.
Co-Authored-By: steveklabnik <steve@steveklabnik.com>
@bors
Copy link
Contributor

bors commented Oct 25, 2018

📌 Commit aec920b has been approved by pietroalbini

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Oct 25, 2018
@bors

This comment has been minimized.

@bors

This comment has been minimized.

@rust-highfive

This comment has been minimized.

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 25, 2018
@pietroalbini

This comment has been minimized.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 25, 2018
@bors

This comment has been minimized.

@bors

This comment has been minimized.

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 25, 2018
@rust-highfive

This comment has been minimized.

@pietroalbini
Copy link
Member Author

@bors retry (crates.io failure)

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 25, 2018
@bors
Copy link
Contributor

bors commented Oct 25, 2018

⌛ Testing commit aec920b with merge bf6f91ec74cad2f4fad1189157b4203762c271c7...

@bors
Copy link
Contributor

bors commented Oct 26, 2018

💔 Test failed - status-travis

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 26, 2018
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-debug of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[00:33:45]    Compiling rustc_asan v0.0.0 (/checkout/src/librustc_asan)
[00:33:45]    Compiling rustc_tsan v0.0.0 (/checkout/src/librustc_tsan)
[00:33:45]    Compiling rustc_msan v0.0.0 (/checkout/src/librustc_msan)
[00:33:46]    Compiling rustc_lsan v0.0.0 (/checkout/src/librustc_lsan)
[00:34:19] rustc: /checkout/src/llvm/include/llvm/Support/Casting.h:106: static bool llvm::isa_impl_cl<To, const From*>::doit(const From*) [with To = llvm::MDTuple; From = llvm::Metadata]: Assertion `Val && "isa<> used on a null pointer"' failed.
[00:34:23] rustc exited with signal: 6
[00:34:23] error: Could not compile `core`.
[00:34:23] 
[00:34:23] To learn more, run the command again with --verbose.
[00:34:23] To learn more, run the command again with --verbose.
[00:34:23] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" "panic-unwind backtrace" "--manifest-path" "/checkout/src/libstd/Cargo.toml" "--message-format" "json"
[00:34:23] expected success, got: exit code: 101
[00:34:23] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1101:9
[00:34:23] travis_fold:end:stage1-std

[00:34:23] travis_time:end:stage1-std:start=1540512106299722217,finish=1540512155608200322,duration=49308478105

---
travis_time:end:02444150:start=1540512156595748503,finish=1540512156606251213,duration=10502710
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:052c6b60
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:start:crashlog
obj/cores/core.26389.!checkout!obj!build!x86_64-unknown-linux-gnu!stage1!bin!rustc
[New LWP 26389]
[New LWP 26997]
[New LWP 26996]
warning: Could not load shared library symbols for 8 libraries, e.g. /lib/x86_64-linux-gnu/libc.so.6.
Use the "info sharedlibrary" command to see the complete listing.
Do you need "set solib-search-path" or "set sysroot"?
Core was generated by `/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/bin/rustc --crate-name core'.
Program terminated with signal SIGABRT, Aborted.
#0  0x00007f7088c43428 in ?? ()
#0  0x00007f7088c43428 in ?? ()
#1  0x00007f7088c4502a in ?? ()
#2  0x0000000000000020 in ?? ()
#3  0x0000000000000000 in ?? ()
travis_time:end:052c6b60:start=1540512156612861834,finish=1540512161267579067,duration=4654717233
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:01900752
travis_time:start:01900752
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:07affac0
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@estebank
Copy link
Contributor

That's a weird llvm error:

49.31sBuilding stage1 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[00:33:34]    Compiling cc v1.0.25
[00:33:34]    Compiling core v0.0.0 (/checkout/src/libcore)
[00:33:34]    Compiling build_helper v0.1.0 (/checkout/src/build_helper)
[00:33:34]    Compiling unwind v0.0.0 (/checkout/src/libunwind)
[00:33:41]    Compiling compiler_builtins v0.0.0 (/checkout/src/rustc/compiler_builtins_shim)
[00:33:41]    Compiling cmake v0.1.33
[00:33:41]    Compiling std v0.0.0 (/checkout/src/libstd)
[00:33:45]    Compiling rustc_asan v0.0.0 (/checkout/src/librustc_asan)
[00:33:45]    Compiling rustc_tsan v0.0.0 (/checkout/src/librustc_tsan)
[00:33:45]    Compiling rustc_msan v0.0.0 (/checkout/src/librustc_msan)
[00:33:46]    Compiling rustc_lsan v0.0.0 (/checkout/src/librustc_lsan)
[00:34:19] rustc: /checkout/src/llvm/include/llvm/Support/Casting.h:106: static bool llvm::isa_impl_cl<To, const From*>::doit(const From*) [with To = llvm::MDTuple; From = llvm::Metadata]: Assertion `Val && "isa<> used on a null pointer"' failed.
[00:34:23] [RUSTC-TIMING] core test:false 48.883
[00:34:23] rustc exited with signal: 6
[00:34:23] error: Could not compile `core`.
[00:34:23] 
[00:34:23] To learn more, run the command again with --verbose.
[00:34:23] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" "panic-unwind backtrace" "--manifest-path" "/checkout/src/libstd/Cargo.toml" "--message-format" "json"
[00:34:23] expected success, got: exit code: 101
[00:34:23] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1101:9
[00:34:23] note: Run with `RUST_BACKTRACE=1` for a backtrace.

@pietroalbini pietroalbini deleted the rollup branch October 26, 2018 07:48
@Centril Centril added the rollup A PR which is a rollup label Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.