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 with pattern match on xcrate-reexported enum variant #13872

Closed
alexcrichton opened this issue May 1, 2014 · 1 comment · Fixed by #13873
Closed

ICE with pattern match on xcrate-reexported enum variant #13872

alexcrichton opened this issue May 1, 2014 · 1 comment · Fixed by #13873
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@alexcrichton
Copy link
Member

// foo.rs
#![crate_type = "rlib"]

pub enum A { B }

// bar.rs
#![crate_type = "rlib"]

extern crate foo;

pub use foo::B;

// baz.rs
#![crate_type = "rlib"]

extern crate bar;

use bar::B;

fn foo() {
    match B {
        B => {}
    }
}
$ rustc foo.rs && rustc -L. bar.rs && rustc -L. baz.rs
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://static.rust-lang.org/doc/master/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'lookup_item: id not found: 3', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/s
rc/librustc/metadata/decoder.rs:93

stack backtrace:
   1:     0x7fce725198e0 - rt::backtrace::imp::write::h04501b112343e4d4Mwa::v0.11.pre
   2:     0x7fce724792a0 - rt::unwind::begin_unwind_inner::hfcab8698d135644bR69::v0.11.pre
   3:     0x7fce72478f20 - rt::unwind::begin_unwind_fmt::h9ae5c1883262acc9159::v0.11.pre
   4:     0x7fce735f06d0 - metadata::decoder::lookup_item::h6461ed7d9ac122cbHma::v0.11.pre
   5:     0x7fce735f3e60 - metadata::decoder::get_type::h475e86478947faabNOa::v0.11.pre
   6:     0x7fce72e8bfd0 - middle::ty::lookup_item_type::h951ff31d32a85dbeEtP::v0.11.pre
   7:     0x7fce730a8410 - middle::typeck::check::_match::check_pat_variant::h840491536048be96mzZ::v0.11.pre
   8:     0x7fce730a4a20 - middle::typeck::check::_match::check_pat::h18df281016132163j3Z::v0.11.pre
   9:     0x7fce730a4110 - middle::typeck::check::_match::check_match::hb48b2a9d6ea92199QuZ::v0.11.pre
  10:     0x7fce73149130 - middle::typeck::check::check_expr_with_unifier::h68191f4991ee106cDy9::v0.11.pre
  11:     0x7fce7312a4d0 - middle::typeck::check::check_block_with_expected::h60238d28348d470clUb::v0.11.pre
  12:     0x7fce73125dd0 - middle::typeck::check::check_fn::h45867583beed19cbSn7::v0.11.pre
  13:     0x7fce73125b70 - middle::typeck::check::check_bare_fn::h5a74c0289e30c741Jd7::v0.11.pre
  14:     0x7fce7311d8d0 - middle::typeck::check::check_item::h418ccf98926b96ca6J7::v0.11.pre
  15:     0x7fce73125970 - middle::typeck::check::check_item_types::ha1866c21fb2bfb501c7::v0.11.pre
  16:     0x7fce73264150 - util::common::time::h561932986504602240::v0.11.pre
  17:     0x7fce73262ea0 - middle::typeck::check_crate::h9f866325bbdc0e67lIu::v0.11.pre
  18:     0x7fce736a01c0 - driver::driver::phase_3_run_analysis_passes::hfe12640f9b1312adTCf::v0.11.pre
  19:     0x7fce736a60d0 - driver::driver::compile_input::h0aada067d2ebbe0bG2f::v0.11.pre
  20:     0x7fce736cad30 - run_compiler::h7fbc638a4eb1256cxzn::v0.11.pre
  21:     0x7fce736e2bb0 - main_args::closure.91434
  22:     0x7fce736e10b0 - monitor::closure.91309
  23:     0x7fce736dc9a0 - task::TaskBuilder::try::closure.91075
  24:     0x7fce755a5f80 - task::spawn_opts::closure.7111
  25:     0x7fce72514920 - rt::task::Task::run::closure.40130
  26:     0x7fce7251f840 - rust_try
  27:     0x7fce72514760 - rt::task::Task::run::h84e43b6a7308c539UW7::v0.11.pre
  28:     0x7fce755a5d50 - task::spawn_opts::closure.7084
  29:     0x7fce72518420 - rt::thread::thread_start::hca3848d85a99d9cb7B8::v0.11.pre
  30:     0x7fce71e33ea0 - start_thread
  31:     0x7fce72143999 - __clone
  32:                0x0 - <unknown>
@alexcrichton alexcrichton changed the title Obscure ICE with chains of reexports ICE with pattern match on reexported enum variant May 1, 2014
@alexcrichton
Copy link
Member Author

Updated with smaller code and more accurate title

@alexcrichton alexcrichton changed the title ICE with pattern match on reexported enum variant ICE with pattern match on xcrate-reexported enum variant May 1, 2014
alexcrichton added a commit to alexcrichton/rust that referenced this issue May 1, 2014
This was just a typo in the decoder using the source crate's number rather than
the destination crate's number of a reexport.

Closes rust-lang#13872
bors added a commit that referenced this issue May 1, 2014
This was just a typo in the decoder using the source crate's number rather than
the destination crate's number of a reexport.

Closes #13872
arcnmx pushed a commit to arcnmx/rust that referenced this issue Jan 9, 2023
feat: Package Windows release artifacts as ZIP and add symbols file

Closes rust-lang#13872
Closes rust-lang#7747
CC rust-lang#10371

This allows us to ship a format that's easier to handle on Windows. As a bonus, we can also include the PDB, to get useful stack traces. Unfortunately, it adds a couple of dependencies to `xtask`, increasing the debug build times from 1.28 to 1.58 s (release from 1.60s to 2.20s) on my system.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant