Skip to content

ICE in codemap::CodeMap::bytepos_to_file_charpos #24687

Closed
@nwin

Description

@nwin

I’m getting an ICE when compiling https://github.com/nwin/gif/tree/cef32bb49589ff55135745b23ac54978ee6edecf using cargo test

$ rustc --version
$ rustc 1.0.0-nightly (abf0548b5 2015-04-15) (built 2015-04-15)

note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'assertion failed: bpos.to_usize() >= mbc.pos.to_usize() + mbc.bytes', /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/src/libsyntax/codemap.rs:780

stack backtrace:
   1:        0x10eb11f2f - sys::backtrace::write::ha929f94fedfba769pSs
   2:        0x10eb1a532 - panicking::on_panic::h99f1d335a08c6040yQw
   3:        0x10ead0765 - rt::unwind::begin_unwind_inner::h9ae94a4551603e31hyw
   4:        0x10e1ee09f - rt::unwind::begin_unwind::h936509937193573473
   5:        0x10e27821a - codemap::CodeMap::bytepos_to_file_charpos::h894b029e4291f71eRlA
   6:        0x10e27628e - codemap::CodeMap::lookup_char_pos::h85ee94f5ab885dffmcA
   7:        0x10b864989 - trans::debuginfo::set_source_location::he11b794ea5b45de1CQw
   8:        0x10b87f154 - trans::expr::trans_unadjusted::hb4afd18239032dc7GuA
   9:        0x10b7b227f - trans::expr::trans::hd8cdbc15463fe10aN7z
  10:        0x10b85356a - trans::expr::trans_to_lvalue::hd50af93dcb00cb6fPtA
  11:        0x10b7c30e8 - trans::base::init_local::h53c6350bcde5d4f8zVg
  12:        0x10b7d3a93 - trans::controlflow::trans_block::h05c053a1e1c911e0pXu
  13:        0x10b88079c - trans::expr::trans_rvalue_dps_unadjusted::h0d3d525097831c6c9ZA
  14:        0x10b8539f7 - trans::expr::trans_into::haf8ca3e6278522acu1z
  15:        0x10b8c07f1 - trans::_match::trans_match_inner::h953f25261ea34903rVH
  16:        0x10b88075c - trans::expr::trans_rvalue_dps_unadjusted::h0d3d525097831c6c9ZA
  17:        0x10b8539f7 - trans::expr::trans_into::haf8ca3e6278522acu1z
  18:        0x10b8534e1 - trans::controlflow::trans_stmt_semi::h6eafcd2a18896ae0tWu
  19:        0x10b7d3a68 - trans::controlflow::trans_block::h05c053a1e1c911e0pXu
  20:        0x10b7d2745 - trans::base::trans_closure::hb95e36728c78f255wCh
  21:        0x10b7d43de - trans::base::trans_fn::hfe46a51c23baaac8eNh
  22:        0x10b816115 - trans::monomorphize::monomorphic_fn::h41b6fefa23d7bff0QvJ
  23:        0x10b8aa0ad - trans::glue::trans_struct_drop::h95c0ab33ac82b921cHE
  24:        0x10b8a988a - trans::glue::trans_struct_drop_flag::h2f9049e44accca59yzE
  25:        0x10b8a779c - trans::glue::get_drop_glue::h5bbbd65896407d4eOrE
  26:        0x10b7d6d53 - trans::glue::drop_ty::ha64a0229575a6c77ioE
  27:        0x10b820c1a - trans::cleanup::DropValue<'tcx>.Cleanup<'tcx>::trans::h11819e958a8977feiXp
  28:        0x10b7d403c - trans::cleanup::FunctionContext<'blk, 'tcx>.CleanupMethods<'blk, 'tcx>::pop_and_trans_custom_cleanup_scope::hc7f42f836e64f431k0o
  29:        0x10b8c0803 - trans::_match::trans_match_inner::h953f25261ea34903rVH
  30:        0x10b88075c - trans::expr::trans_rvalue_dps_unadjusted::h0d3d525097831c6c9ZA
  31:        0x10b8539f7 - trans::expr::trans_into::haf8ca3e6278522acu1z
  32:        0x10b8d6dd1 - trans::_match::mk_binding_alloca::h1219482591938210151
  33:        0x10b7c2ff9 - trans::base::init_local::h53c6350bcde5d4f8zVg
  34:        0x10b7d3a93 - trans::controlflow::trans_block::h05c053a1e1c911e0pXu
  35:        0x10b88079c - trans::expr::trans_rvalue_dps_unadjusted::h0d3d525097831c6c9ZA
  36:        0x10b8539f7 - trans::expr::trans_into::haf8ca3e6278522acu1z
  37:        0x10b8534e1 - trans::controlflow::trans_stmt_semi::h6eafcd2a18896ae0tWu
  38:        0x10b7d3a68 - trans::controlflow::trans_block::h05c053a1e1c911e0pXu
  39:        0x10b7d2745 - trans::base::trans_closure::hb95e36728c78f255wCh
  40:        0x10b7d43de - trans::base::trans_fn::hfe46a51c23baaac8eNh
  41:        0x10b816115 - trans::monomorphize::monomorphic_fn::h41b6fefa23d7bff0QvJ
  42:        0x10b8059b7 - trans::callee::trans_fn_ref_with_substs::h86c8e91680731ba8hzn
  43:        0x10b804452 - trans::callee::trans_fn_ref::h958664b74b95968fmnn
  44:        0x10b81a63b - trans::meth::trans_method_callee::h987afa832ddedd00RsI
  45:        0x10b8189cc - trans::callee::trans_call_inner::h4319642190639167236
  46:        0x10b881399 - trans::expr::trans_rvalue_dps_unadjusted::h0d3d525097831c6c9ZA
  47:        0x10b8539f7 - trans::expr::trans_into::haf8ca3e6278522acu1z
  48:        0x10b7d3da9 - trans::controlflow::trans_block::h05c053a1e1c911e0pXu
  49:        0x10b7d2745 - trans::base::trans_closure::hb95e36728c78f255wCh
  50:        0x10b7d43de - trans::base::trans_fn::hfe46a51c23baaac8eNh
  51:        0x10b816115 - trans::monomorphize::monomorphic_fn::h41b6fefa23d7bff0QvJ
  52:        0x10b8059b7 - trans::callee::trans_fn_ref_with_substs::h86c8e91680731ba8hzn
  53:        0x10b804452 - trans::callee::trans_fn_ref::h958664b74b95968fmnn
  54:        0x10b81a63b - trans::meth::trans_method_callee::h987afa832ddedd00RsI
  55:        0x10b8189cc - trans::callee::trans_call_inner::h4319642190639167236
  56:        0x10b881399 - trans::expr::trans_rvalue_dps_unadjusted::h0d3d525097831c6c9ZA
  57:        0x10b87f644 - trans::expr::trans_unadjusted::hb4afd18239032dc7GuA
  58:        0x10b7b227f - trans::expr::trans::hd8cdbc15463fe10aN7z
  59:        0x10b85356a - trans::expr::trans_to_lvalue::hd50af93dcb00cb6fPtA
  60:        0x10b7c30e8 - trans::base::init_local::h53c6350bcde5d4f8zVg
  61:        0x10b7d3a93 - trans::controlflow::trans_block::h05c053a1e1c911e0pXu
  62:        0x10b88079c - trans::expr::trans_rvalue_dps_unadjusted::h0d3d525097831c6c9ZA
  63:        0x10b8539f7 - trans::expr::trans_into::haf8ca3e6278522acu1z
  64:        0x10b7d3da9 - trans::controlflow::trans_block::h05c053a1e1c911e0pXu
  65:        0x10b7d2745 - trans::base::trans_closure::hb95e36728c78f255wCh
  66:        0x10b7d43de - trans::base::trans_fn::hfe46a51c23baaac8eNh
  67:        0x10b7d7948 - trans::base::trans_item::h5ed811cd725f9768qbi
  68:        0x10b7e6730 - trans::base::trans_crate::ha94fa9dd82b4aff2r0i
  69:        0x10b272e0e - driver::phase_4_translate_to_llvm::h1f657f4f3b9a6259hOa
  70:        0x10b24b2f4 - driver::compile_input::h00eb3ba6a5bfe392Qba
  71:        0x10b3128f3 - run_compiler::h4caa8708186861beF4b
  72:        0x10b31041a - boxed::F.FnBox<A>::call_box::h5773103399936443887
  73:        0x10b30f8b7 - rt::unwind::try::try_fn::h10299548411236091824
  74:        0x10eba32f8 - rust_try_inner
  75:        0x10eba32e5 - rust_try
  76:        0x10b30fb90 - boxed::F.FnBox<A>::call_box::h3149649929762739958
  77:        0x10eb1907d - sys::thread::create::thread_start::h2951ccda778a4dacgVv
  78:     0x7fff9b248267 - _pthread_body
  79:     0x7fff9b2481e4 - _pthread_start

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions