-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Infinite loop and enormous memory consumption when building release #50323
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
Possibly related to #49402 |
Output of
Last line printed is about linking, so maybe this is getting stuck in LTO? |
Here's a self-contained test case that just barely hits the sweet spot where it starts to grow out of hand: fn main() {
use ::std::collections::HashSet;
let set: HashSet<_> = {
(0..86).into_iter()
.chain(87..89)
.chain(92..93)
.chain(94..105)
// .chain(107..108)
.chain(116..118)
.chain(122..124)
.chain(128..131)
.chain(133..134)
// .chain(141..143)
.chain(151..152)
.chain(153..154)
// .chain(158..168)
// .chain(169..170)
// .chain(179..180)
// .chain(181..182)
// .chain(185..186)
.chain(188..189)
.chain(201..202)
// .chain(203..204)
.collect()
};
assert!(set.contains(&153));
} I do observe that "linking" is the last thing printed... but not quite in the same sense as @fitzgen: 😛
cargo +nightly rustc --release -- -Ztime-passes (62.3s)
cargo +nightly rustc --release -- -Ztime-passes -Ccodegen-units=1 (63.2s)
|
Avoids running afoul of rust-lang/rust#50323
Seems to have been resolved. Works fine with a recent nightly to compile @ExpHP's example (in addition, with everything uncommented). Appears to have been fixed a while ago as rustc 2019-09-23 works fine too. cargo +nightly rustc --release -- -Ztime-passes
|
This went away at some point, yeah. |
Check out https://github.com/khuey/cpp_demangle/tree/experimental.
cargo build
works fine.cargo build --release
seems to go into an iloop and burn through memory (I gave it 10 minutes of CPU and 16GB of memory before I killed it).The previous commit works fine, so something in khuey/cpp_demangle@df43ff0 is triggering it.
I see this on both stable and latest nightly.
The text was updated successfully, but these errors were encountered: