-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Compiler panic compiling libcore #43982
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Just hit this myself. It only happens in my builds if I pass Note that it does need to be a clean build when changing At commit a209539 |
Ping @michaelwoerister, since you wrote commit 783ccc4 implicated in OP, any ideas? |
Hm, looks like the |
I just ran into this trying to run the CI container build for FreeBSD, to investigate #44433. I worked around it for now by removing |
ping @michaelwoerister I just ran into this |
Maybe @nrc can help debug this? It seems that in |
How can NetBSD users inject the As a workaround, I'm using rustup to install rustc and cargo in NetBSD, now that rustup features support for the NetBSD kernel :) |
Does anyone have a minimal test case for this? That NodeId=1 seems suspicious, it would be good to see the source code where this happened to get some idea about what is going on. Maybe it is a synthetic argument for a |
#63663 seems like it has an easy reproduction |
Nominating. This has been reported at least 6 times, and is being hit in random PR builds too. |
Visiting for compiler triage. This problems seems to be closely tied to save-analysis, correct? @Xanewok, maybe you can investigate, and ping @michaelwoerister for help where needed? |
Marking P-high and assigning to @Xanewok, because I'm optimistic like that. |
This looks strikingly similar to #60649 where we didn't nest typeck tables in the AST visitor. In this case it's extern { fn func(arg: SomeType); } |
The backtrace in the OP is outdated or at least that's not the issue I first encountered. In general it seems that generating save-analysis from libcore triggers a debug-assertion (which is why it came up recently when running dist builds with I managed to reproduce it with: # config.toml
[build]
extended = true
[rust]
debug-assertions = true
tools = ["analysis"] by running The current backtrace I'm getting is as follows:
on most recent which I believe stumbles on rust/src/libcore/iter/adapters/flatten.rs Lines 245 to 260 in 9776723
most specifically when processing the associated |
With pub trait Trait {
type Assoc;
}
pub fn func() {
fn _inner<U: Trait>(_: U::Assoc) {}
} |
… r=varkor save-analysis: Nest typeck tables when processing functions/methods Fixes an issue where we did not nest tables correctly when resolving associated types in formal argument/return type positions. This was the minimized reproduction case that I tested the fix on: ```rust pub trait Trait { type Assoc; } pub struct A; pub fn func() { fn _inner1<U: Trait>(_: U::Assoc) {} fn _inner2<U: Trait>() -> U::Assoc { unimplemented!() } impl A { fn _inner1<U: Trait>(self, _: U::Assoc) {} fn _inner2<U: Trait>(self) -> U::Assoc { unimplemented!() } } } ``` using `debug_assertions`-enabled rustc and by additionally passing `-Zsave-analysis`. Unfortunately the original assertion fired is a *debug* one and from what I can tell we don't run the tests with these on, so I'm not adding a test here. If I missed it and there is a way to run tests with these on, I'd love to add a test case for this. Closes rust-lang#63663 Closes rust-lang#50328 Closes rust-lang#43982
Uh oh!
There was an error while loading. Please reload this page.
Last rebase was 11. Aug. Using rust-llvm-2017-07-20.
EDIT: First bad commit is 783ccc4
Compiling with:
The text was updated successfully, but these errors were encountered: