-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Recompiling causes panic #63349
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
Comments
Did you use sccache or anything similar? |
not locally where I'm experiencing the problem |
Assigning @michaelwoerister to investigate, there is very little else to do here. |
I have not been able to reproduce this yet. @mattrutherford, would you mind providing the exact commands you are running and the set of source files you are modifying? |
yes, ok steps I can take to reproduce:
gives the error |
@mattrutherford "Make change " can you specify it please? Where did you change what? A diff would be good (e.g. if you happen to have a cloned repo, then you can do |
I can reproduce on Fedora 30 when also setting It's probably a buggy interaction incremental compilation and LTO (cc @alexcrichton). Not sure if it is wasm specific. |
Hm I was getting build errors locally and wasn't able to reproduce. I'm not really sure what compiler is necessary to fix errors like:
|
I think unfortunately you tried at a time where master was broken! If you can try again, maybe it's possible to reproduce the original problem |
Ok looks like this is actually pretty trivial to reproduce:
|
Should be fixed by #63956 |
…michaelwoerister rustc: Handle modules in "fat" LTO more robustly When performing a "fat" LTO the compiler has a whole mess of codegen units that it links together. To do this it needs to select one module as a "base" module and then link everything else into this module. Previously LTO passes assume that there's at least one module in-memory to link into, but nowadays that's not always true! With incremental compilation modules may actually largely be cached and it may be possible that there's no in-memory modules to work with. This commit updates the logic of the LTO backend to handle modules a bit more uniformly during a fat LTO. This commit immediately splits them into two lists, one serialized and one in-memory. The in-memory list is then searched for the largest module and failing that we simply deserialize the first serialized module and link into that. This refactoring avoids juggling three lists, two of which are serialized modules and one of which is half serialized and half in-memory. Closes rust-lang#63349
Making changes to code in modules that compile to WASM and running
cargo build --release
results in a panic.This is the project: https://github.com/paritytech/substrate
Immediately running
cargo clean && cargo build --release
will allow successful compilation. Also upgrading to a new version of nightly will allow recompilation withoutcargo clean
, but only the first recompile.Meta
rustc --version --verbose
:rustc 1.38.0-nightly (6a91782 2019-08-06) running on x86_64-apple-darwin
Backtrace:
The text was updated successfully, but these errors were encountered: