-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Incremental ICE (DepNode Hir should have been pre-allocated but wasn't) #69596
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
Do we have confirmation that this isn't an incremental bug (and unrelated to 1.41.1?). |
Confirmed incremental compilation bug. Not a 1.41.1 regression. |
This comment has been minimized.
This comment has been minimized.
To reproduce: Run |
This comment has been minimized.
This comment has been minimized.
Maybe run |
That did it. Confirming I'm seeing the same behavior as you — not a regression (at least recently). |
This seems like it could have been fixed by #68289. |
It still reproduces on rustc 1.43.0-nightly (0eb878d 2020-02-28) |
This goes away when stripping the proc macros. Apart from nuking the two directories, it's a couple changes to eliminate the usage. I've just uploaded my test case to jhpratt/time-ice-repro. |
Great! Marking needstest to get a usable test for those PRs then. Maybe someone can help reduce this to a single file without dependencies? @rustbot ping icebreakers-llvm |
Hey LLVM ICE-breakers! This bug has been identified as a good cc @comex @DutchGhost @hanna-kruppe @hdhoang @heyrutvik @JOE1994 @jryans @mmilenko @nagisa @nikic @Noah-Kennedy @SiavoshZarrasvand @spastorino @vertexclique @vgxbj |
Oh darn, wrong team, sorry about that. I meant: @rustbot ping icebreakers-cleanup-crew |
Hey Cleanup Crew ICE-breakers! This bug has been identified as a good cc @AminArria @chrissimpkins @contrun @DutchGhost @elshize @ethanboxx @h-michael @HallerPatrick @hdhoang @hellow554 @imtsuki @jakevossen5 @KarlK90 @LeSeulArtichaut @matheus-consoli @mental32 @nmccarty @Noah-Kennedy @pard68 @PeytonT @pierreN @Redblueflame @RobbieClarken @RobertoSnap @robjtede @SarthakSingh31 @senden9 @shekohex @sinato @spastorino @turboladen @woshilapin @yerke |
I've managed to replicate the error in a project with only a few modules and a single external dependency on |
Here is a reproduction in a single file: mod mod_a {
mod name_of_proc_macro {}
use crate::mod_b::*;
mod mod_c {
fn _foobar() {
use super::name_of_proc_macro;
}
}
}
mod mod_b {
pub(crate) use std::format as name_of_proc_macro; // DELETE TO TRIGGER ICE
} The ICE can be triggered by:
The error occurred in the |
Note that this is not a result of the same name referring to different things between builds, as placing
mod mod_a {
mod name_of_proc_macro {}
use crate::mod_b::*;
fn _foobar() {
use name_of_proc_macro;
}
}
mod mod_b {
pub(crate) use std::format as name_of_proc_macro;
} |
reduced, without any dependencies. Much thanks to robbie an jhpratt! // Regression test for #69596.
// TODO: Some explanation please :)
// revisions: rpass1 rpass2
// check-pass
#![allow(unused_imports)]
#[macro_export]
macro_rules! a_macro {
() => {};
}
#[cfg(rpass1)]
use a_macro as same_name;
mod same_name {}
mod needed_mod {
fn _crash() {
use super::same_name;
}
}
fn main() {}
|
This happens because there is a missing dependency on items inside a function in fn _crash() {
#[cfg(rpass1)]
use super::same_name;
} This is because the When try to mark This bug is fixed in #68944 where We have a workaround in place which treats |
Fixed by #68944. |
I've pushed a commit to this branch of the time repository, containing the full code that causes the error. I haven't yet tried to create a minimal example; I can do that at some point if it's desired.
This code does not have any issue running
cargo check
on rustc 1.41.0. It fails on 1.41.1.Output with
RUST_BACKTRACE=1
:Looks like there are a number of issues possibly related. Feel free to close if it's a duplicate, of course.
The text was updated successfully, but these errors were encountered: