Skip to content

ICE when compiling with debug info #20992

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

Closed
Marwes opened this issue Jan 12, 2015 · 3 comments
Closed

ICE when compiling with debug info #20992

Marwes opened this issue Jan 12, 2015 · 3 comments
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@Marwes
Copy link
Contributor

Marwes commented Jan 12, 2015

Got another ICE, this time it only shows itself when compiled with debug info (rustc -g error.rs).
Also of note is that another ICE shows itself if the State wrapper is removed (I can file a separate report for that if you want but I figure they might be the same issue).

struct State<I>;

trait Parser {
    type Input;
}

impl Parser for ()  {
    type Input = ();
}

struct IntoIter<P: Parser> {
    input: State<<P as Parser>::Input>
}

fn main() {
    let p  = IntoIter::<()> { input: State::<()> };
}
//Compile with rustc error.rs -g
error: internal compiler error: get_unique_type_id_of_type() - unexpected type:
<() as Parser>::Input, ty_projection(ProjectionTy { trait_ref: Rc(TraitRef { def_id: DefId { krate: 0u32, node: 8u32 }, substs: Substs { types: VecPerParamSpace {TypeSpace: [], SelfSpace: [TyS { sty: ty_tup([]), flags: 0, region_depth: 0u32 }], FnSpace: [], }, regions: NonerasedRegions(VecPerParamSpace {TypeSpace: [],
SelfSpace: [], FnSpace: [], }) } }), item_name: "Input"(64) })
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', C:\bot\slave\nightly-dist-rustc-win-64\build\src\libsyntax\diagnostic.rs:182

stack backtrace:
   1:         0x69bec997 - sys::backtrace::write::h62d87c63e18a3ea5JRt
   2:         0x69c00672 - rt::unwind::register::haa3a38fa07bfa9beVGz
   3:         0x69b834a7 - rt::unwind::begin_unwind_inner::hbebf9f8c0125ffc9tEz
   4:         0x6f898116 - diagnostic::SpanHandler::span_bug::hebc2106d060dd9d6xSF
   5:         0x6f8989c5 - diagnostic::Handler::bug::hd75d92a08fdf3c17DYF
   6:           0x801852 - session::Session::bug::h9385caa3fe1c8dc3wQq
   7:          0x11467b7 - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD
   8:          0x114a57a - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD
   9:          0x1147448 - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD
  10:          0x114c721 - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD
  11:          0x1154a87 - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD
  12:          0x11545ca - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD
  13:          0x11504ef - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD
  14:          0x11531f4 - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD
  15:          0x114d472 - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD
  16:          0x114eaa2 - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD
  17:          0x114e2bf - trans::debuginfo::UniqueTypeId...std..fmt..Show::fmt::h6619b90c5d2210b6NBD
  18:          0x1033554 - trans::cleanup::FunctionContext<'blk, 'tcx>.CleanupMethods<'blk, 'tcx>::pop_and_trans_ast_cleanup_scope::h80e56e364b2716daMFK
  19:          0x10fd20a - trans::base::IsUnboxedClosureFlag...std..clone..Clone::clone::h7d2a86d65666b43aQYt
  20:          0x101e571 - trans::context::CrateContext<'b, 'tcx>::sess::h6fdd1e7dea5490cdItm
  21:          0x1019cc3 - trans::context::CrateContext<'b, 'tcx>::stats::hd7a1dc7a2465d605EGm
  22:          0x1103768 - trans::base::trans_crate::h4bc502f506e6c118Wsv
  23:         0x70b2af6a - driver::phase_4_translate_to_llvm::haa9c5e826483e242PFa
  24:         0x70b03623 - driver::compile_input::hf5b2f58693da03b5xba
  25:         0x70bd1eec - run::ha65e56249318cc0dV3b
  26:         0x70bd04cc - run::ha65e56249318cc0dV3b
  27:         0x70bcf16a - run::ha65e56249318cc0dV3b
  28:         0x69c2881c - rust_try
  29:         0x69c287f9 - rust_try
  30:         0x70bcf854 - run::ha65e56249318cc0dV3b
  31:         0x69bf14a7 - sys::tcp::TcpListener::bind::hc4a8da4adad0f541bsw
  32:     0x7fff4c8816ad - BaseThreadInitThunk
rustc 1.0.0-nightly (44a287e6e 2015-01-08 17:03:40 -0800)
binary: rustc
commit-hash: 44a287e6eb22ec3c2a687fc156813577464017f7
commit-date: 2015-01-08 17:03:40 -0800
host: x86_64-pc-windows-gnu
release: 1.0.0-nightly
@jdm jdm added the A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) label Jan 12, 2015
@jdm
Copy link
Contributor

jdm commented Jan 12, 2015

This will be fixed by #20960.

@Marwes
Copy link
Contributor Author

Marwes commented Jan 19, 2015

Still an issue but it seems to be a duplicate of #20797

@sanxiyn sanxiyn added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Jan 25, 2015
@Marwes
Copy link
Contributor Author

Marwes commented Jan 25, 2015

Fixed a long with #20797

@Marwes Marwes closed this as completed Jan 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

3 participants