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

ICE: delay span bug / failed to process buffered lint here: lint-qualification.rs with -Zunpretty=everybody_loops #82327

Closed
matthiaskrgr opened this issue Feb 20, 2021 · 2 comments
Labels
C-bug Category: This is a bug. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

Code

code reduced from ./src/test/ui/lint/lint-qualification.rs

mod foo {
    pub fn bar() {}
}

fn main() {
    let _ = || -> Result<(), ()> { try!(Ok(())); Ok(()) }; // issue #37345

    macro_rules! m { () => {
        $crate::foo::bar(); // issue #37357
        ::foo::bar(); // issue #38682
    } }
    m!();
}

Meta

rustc --version --verbose:

rustc 1.52.0-nightly (9b471a3f5 2021-02-19)
binary: rustc
commit-hash: 9b471a3f5fe57e5c6e08acf665f2094422415a3d
commit-date: 2021-02-19
host: x86_64-unknown-linux-gnu
release: 1.52.0-nightly
LLVM version: 11.0.1

Error output

rustc ./src/test/ui/lint/lint-qualification.rs -Zunpretty=everybody_loops

#![feature(prelude_import)]
#![no_std]
#[prelude_import]
use ::std::prelude::v1::*;
#[macro_use]
extern crate std;
mod foo {
    pub fn bar() { loop  { } }
}

fn main() { // issue #37345

    macro_rules! m {
        () =>
        {
            $ crate :: foo :: bar() ; :: foo :: bar() ; // issue #37357
            // issue #38682
        }
    }
    loop  { }
}
error: internal compiler error: failed to process buffered lint here
 --> ./src/test/ui/lint/lint-qualification.rs:6:36
  |
6 |     let _ = || -> Result<(), ()> { try!(Ok(())); Ok(()) }; // issue #37345
  |                                    ^^^
  |
  = note: delayed at /rustc/9b471a3f5fe57e5c6e08acf665f2094422415a3d/compiler/rustc_lint/src/early.rs:393:18

thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', compiler/rustc_errors/src/lib.rs:1011:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.52.0-nightly (9b471a3f5 2021-02-19) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z unpretty=everybody_loops

query stack during panic:
end of query stack
Backtrace

#![feature(prelude_import)]
#![no_std]
#[prelude_import]
use ::std::prelude::v1::*;
#[macro_use]
extern crate std;
mod foo {
    pub fn bar() { loop  { } }
}

fn main() { // issue #37345

    macro_rules! m {
        () =>
        {
            $ crate :: foo :: bar() ; :: foo :: bar() ; // issue #37357
            // issue #38682
        }
    }
    loop  { }
}
error: internal compiler error: failed to process buffered lint here
 --> ./src/test/ui/lint/lint-qualification.rs:6:36
  |
6 |     let _ = || -> Result<(), ()> { try!(Ok(())); Ok(()) }; // issue #37345
  |                                    ^^^
  |
  = note: delayed at /rustc/9b471a3f5fe57e5c6e08acf665f2094422415a3d/compiler/rustc_lint/src/early.rs:393:18

thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', compiler/rustc_errors/src/lib.rs:1011:13
stack backtrace:
   0:     0x7f7812a6dab0 - std::backtrace_rs::backtrace::libunwind::trace::hb4de9797f80b7b8c
                               at /rustc/9b471a3f5fe57e5c6e08acf665f2094422415a3d/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
   1:     0x7f7812a6dab0 - std::backtrace_rs::backtrace::trace_unsynchronized::h59566d0bd20efff7
                               at /rustc/9b471a3f5fe57e5c6e08acf665f2094422415a3d/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f7812a6dab0 - std::sys_common::backtrace::_print_fmt::hcfa5ce6be50275d4
                               at /rustc/9b471a3f5fe57e5c6e08acf665f2094422415a3d/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x7f7812a6dab0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hd8c307a38b9bab04
                               at /rustc/9b471a3f5fe57e5c6e08acf665f2094422415a3d/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x7f7812adee6c - core::fmt::write::h3868db8542c90941
                               at /rustc/9b471a3f5fe57e5c6e08acf665f2094422415a3d/library/core/src/fmt/mod.rs:1092:17
   5:     0x7f7812a60992 - std::io::Write::write_fmt::hab90295d5a0f197d
                               at /rustc/9b471a3f5fe57e5c6e08acf665f2094422415a3d/library/std/src/io/mod.rs:1568:15
   6:     0x7f7812a719a5 - std::sys_common::backtrace::_print::h19224910b8700cf1
                               at /rustc/9b471a3f5fe57e5c6e08acf665f2094422415a3d/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x7f7812a719a5 - std::sys_common::backtrace::print::h25dedfa68c5fb84a
                               at /rustc/9b471a3f5fe57e5c6e08acf665f2094422415a3d/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x7f7812a719a5 - std::panicking::default_hook::{{closure}}::h12c5765653a72a42
                               at /rustc/9b471a3f5fe57e5c6e08acf665f2094422415a3d/library/std/src/panicking.rs:208:50
   9:     0x7f7812a71453 - std::panicking::default_hook::he65cee71c4209f0c
                               at /rustc/9b471a3f5fe57e5c6e08acf665f2094422415a3d/library/std/src/panicking.rs:225:9
  10:     0x7f78132d008b - rustc_driver::report_ice::h56d5f6e6a9fb9d03
  11:     0x7f7812a722a6 - std::panicking::rust_panic_with_hook::h01a674d863fe0d8a
                               at /rustc/9b471a3f5fe57e5c6e08acf665f2094422415a3d/library/std/src/panicking.rs:595:17
  12:     0x7f7812a71dc7 - std::panicking::begin_panic_handler::{{closure}}::h9b9fecf185178864
                               at /rustc/9b471a3f5fe57e5c6e08acf665f2094422415a3d/library/std/src/panicking.rs:497:13
  13:     0x7f7812a6df4c - std::sys_common::backtrace::__rust_end_short_backtrace::h57be46a42dc7f24b
                               at /rustc/9b471a3f5fe57e5c6e08acf665f2094422415a3d/library/std/src/sys_common/backtrace.rs:141:18
  14:     0x7f7812a71d29 - rust_begin_unwind
                               at /rustc/9b471a3f5fe57e5c6e08acf665f2094422415a3d/library/std/src/panicking.rs:493:5
  15:     0x7f7812a71cdb - std::panicking::begin_panic_fmt::h12277576db89392f
                               at /rustc/9b471a3f5fe57e5c6e08acf665f2094422415a3d/library/std/src/panicking.rs:435:5
  16:     0x7f78162d58b3 - rustc_errors::HandlerInner::flush_delayed::he224ed4cfbe0251e
  17:     0x7f78162d4204 - <rustc_errors::HandlerInner as core::ops::drop::Drop>::drop::h746b5a04aaf3b118
  18:     0x7f781563c94b - core::ptr::drop_in_place<rustc_session::parse::ParseSess>::h1ff0f1d7e7ca1d97
  19:     0x7f7815640460 - <alloc::rc::Rc<T> as core::ops::drop::Drop>::drop::hdcdfc88562db0717
  20:     0x7f781563d90d - core::ptr::drop_in_place<rustc_interface::interface::Compiler>::h5bfbd447b11cd14c
  21:     0x7f781563b000 - rustc_span::with_source_map::hd16d211d24c668a9
  22:     0x7f7815641c62 - scoped_tls::ScopedKey<T>::set::h08e96579ac07fec5
  23:     0x7f7815643448 - std::sys_common::backtrace::__rust_begin_short_backtrace::h84dc4b3263d56f8c
  24:     0x7f7815621aba - core::ops::function::FnOnce::call_once{{vtable.shim}}::h209d27a00dc0b7e3
  25:     0x7f7812a82ffa - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h321523073ee11258
                               at /rustc/9b471a3f5fe57e5c6e08acf665f2094422415a3d/library/alloc/src/boxed.rs:1546:9
  26:     0x7f7812a82ffa - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hf0e85e12c83b99b3
                               at /rustc/9b471a3f5fe57e5c6e08acf665f2094422415a3d/library/alloc/src/boxed.rs:1546:9
  27:     0x7f7812a82ffa - std::sys::unix::thread::Thread::new::thread_start::hba22c7961aa0e2f8
                               at /rustc/9b471a3f5fe57e5c6e08acf665f2094422415a3d/library/std/src/sys/unix/thread.rs:71:17
  28:     0x7f7812988299 - start_thread
  29:     0x7f781289d153 - clone
  30:                0x0 - <unknown>

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.52.0-nightly (9b471a3f5 2021-02-19) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z unpretty=everybody_loops

query stack during panic:
end of query stack

@matthiaskrgr matthiaskrgr added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 20, 2021
@matthiaskrgr
Copy link
Member Author

@rustbot modify labels: requires-nightly

@rustbot rustbot added the requires-nightly This issue requires a nightly compiler in some way. label Feb 20, 2021
fanninpm added a commit to fanninpm/glacier that referenced this issue Feb 20, 2021
@rust-lang-glacier-bot rust-lang-glacier-bot added the glacier ICE tracked in rust-lang/glacier. label Feb 21, 2021
@Alexendoo
Copy link
Member

The everybody loops pass has been removed - #93913

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants