Skip to content

ICE: line-tables only + debuginfo::create_for_loop_var_metadata() #21067

Closed
@zchothia

Description

@zchothia

Compiling with line-tables only (debuginfo=1) is broken in recent nightly builds. This seems to be related to #20127.

Same code snippet:

$ cat debug.rs
fn main() {
    for i in range(0, 10i) {}
}

Compiler invocation:

$ rustc --version
rustc 1.0.0-nightly (44a287e6e 2015-01-08 17:03:40 -0800)

$ RUST_BACKTRACE=1 rustc -C debuginfo=1 debug.rs
[...]
debug.rs:2:9: 2:10 error: internal compiler error: debuginfo::create_for_loop_var_metadata() - Referenced variable location is not an alloca!
debug.rs:2     for i in range(0, 10i) {}
                       ^
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>', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:123

stack backtrace:
   1:     0x7fb052ed2850 - sys::backtrace::write::h5b05e7b061a35107Czt
   2:     0x7fb052ef4a60 - failure::on_fail::h1e9b7e3de59488d1aPz
   3:     0x7fb052e625e0 - rt::unwind::begin_unwind_inner::h23dcfb4c37870bd62tz
   4:     0x7fb04dc54460 - rt::unwind::begin_unwind::h8180555736548804672
   5:     0x7fb04dc543f0 - diagnostic::SpanHandler::span_bug::h3246a6ab77068eb1nQF
   6:     0x7fb050fc5140 - session::Session::span_bug::hcecc3d60de53fc8aYQq
   7:     0x7fb051f978e0 - ast_util::walk_pat::walk_pat_::h449595669652872833
   8:     0x7fb051ec5160 - trans::expr::trans_rvalue_stmt_unadjusted::h3e17f3a20f297c29BMi
   9:     0x7fb051e745f0 - trans::expr::trans_into::ha60adcbe08fa3bdbKyh
  10:     0x7fb051e74c40 - trans::controlflow::trans_block::hdd6a1a94b7524b90B3d
  11:     0x7fb051f40c70 - trans::base::trans_closure::h1947fd5123bfe895EYt
  12:     0x7fb051e5fb10 - trans::base::trans_fn::h5d061f11fc4ac1e7j9t
  13:     0x7fb051e5b0a0 - trans::base::trans_item::h34ec82732f0498f3Ewu
  14:     0x7fb051f48490 - trans::base::trans_crate::he5ffa45aaa619f67lsv
  15:     0x7fb0534303c0 - driver::phase_4_translate_to_llvm::h98aea3c7bb04643bPFa
  16:     0x7fb05340a350 - driver::compile_input::h04aea004c559b910xba
  17:     0x7fb0534d9fe0 - monitor::unboxed_closure.22497
  18:     0x7fb0534d9e40 - thunk::F.Invoke<A, R>::invoke::h11849311349984608396
  19:     0x7fb0534d8bc0 - rt::unwind::try::try_fn::h13617610205470131813
  20:     0x7fb052f5a6c0 - rust_try_inner
  21:     0x7fb052f5a6b0 - rust_try
  22:     0x7fb0534d8eb0 - thunk::F.Invoke<A, R>::invoke::h14452289732390470265
  23:     0x7fb052ee2910 - sys::thread::thread_start::h93b0d38960a9fcacqrw
  24:     0x7fb04d471ec0 - start_thread
  25:     0x7fb052b049d9 - __clone
  26:                0x0 - <unknown>

Metadata

Metadata

Labels

A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions