Skip to content

"called Result::unwrap() on an Err value: Utf8Error { valid_up_to: 2 }" ICE in stable #33778

Closed
@netvl

Description

@netvl

I suddenly got the following error when compiling my crate:

% RUST_BACKTRACE=1 rustup run stable cargo build --verbose
       Fresh num-traits v0.1.32
       Fresh byteorder v0.5.1
       Fresh odds v0.2.12
       Fresh nodrop v0.1.6
       Fresh arrayvec v0.3.15
   Compiling immeta v0.3.4 (file:///home/netvl/dev/lang/rust/projects/immeta)
     Running `rustc src/lib.rs --crate-name immeta --crate-type lib -g --out-dir /home/netvl/dev/lang/rust/projects/immeta/target/debug --emit=dep-info,link -L dependency=/home/netvl/dev/lang/rust/projects/immeta/target/debug -L dependency=/home/netvl/dev/lang/rust/projects/immeta/target/debug/deps --extern arrayvec=/home/netvl/dev/lang/rust/projects/immeta/target/debug/deps/libarrayvec-bcf06b3ef065493b.rlib --extern num_traits=/home/netvl/dev/lang/rust/projects/immeta/target/debug/deps/libnum_traits-a4000e09af4c8117.rlib --extern byteorder=/home/netvl/dev/lang/rust/projects/immeta/target/debug/deps/libbyteorder-4e8da61ace56de4d.rlib`
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/blob/master/CONTRIBUTING.md#bug-reports
thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: Utf8Error { valid_up_to: 2 }', ../src/libcore/result.rs:746
stack backtrace:
   1:     0x7fa66f6de330 - sys::backtrace::tracing::imp::write::h3675b4f0ca767761Xcv
   2:     0x7fa66f6e768b - panicking::default_handler::_$u7b$$u7b$closure$u7d$$u7d$::closure.44519
   3:     0x7fa66f6e71e3 - panicking::default_handler::h18faf4fbd296d909lSz
   4:     0x7fa66f6ab9ac - sys_common::unwind::begin_unwind_inner::hfb5d07d6e405c6bbg1t
   5:     0x7fa66f6ac448 - sys_common::unwind::begin_unwind_fmt::h8b491a76ae84af35m0t
   6:     0x7fa66f6dbd91 - rust_begin_unwind
   7:     0x7fa66f72e7af - panicking::panic_fmt::h98b8cbb286f5298alcM
   8:     0x7fa6674b731b - result::unwrap_failed::h14307315525592478485
   9:     0x7fa6674b728e - Doc<'doc>::as_str_slice::ha91bf39a19faeabdHVa
  10:     0x7fa66d35f45f - loader::Context<'a>::extract_one::h945c702fbde346e3Eem
  11:     0x7fa66d356acf - loader::Context<'a>::find_library_crate::h30971509c344ad3bD3l
  12:     0x7fa66d33bf16 - loader::Context<'a>::load_library_crate::h0ade06e110892b81WSl
  13:     0x7fa66d33ad99 - creader::CrateReader<'a>::resolve_crate::he1542772b02d0896E3j
  14:     0x7fa66d33c58d - creader::CrateReader<'a>::resolve_crate_deps::_$u7b$$u7b$closure$u7d$$u7d$::closure.38792
  15:     0x7fa66d33c33c - collections::hash::map::HashMap<K, V, S>.FromIterator<(K, V)>::from_iter::h12379182329167058746
  16:     0x7fa66d3384dd - creader::CrateReader<'a>::register_crate::h62645edecf14372cTZj
  17:     0x7fa66d33b6e2 - creader::CrateReader<'a>::resolve_crate::he1542772b02d0896E3j
  18:     0x7fa66d33586b - creader::LocalCrateReader<'a, 'b>.Visitor<'hir>::visit_item::hd760834db1c6f482eDj
  19:     0x7fa66d347d7e - creader::LocalCrateReader<'a, 'b>::read_crates::hb36235539ae0e4e04vk
  20:     0x7fa66fc027c7 - driver::phase_3_run_analysis_passes::h10920926650053012691
  21:     0x7fa66fbd8a15 - driver::compile_input::h7ae6a86e23de0774Hca
  22:     0x7fa66fbc7b47 - run_compiler::hb0408bcf47642fe6mPc
  23:     0x7fa66fbc52c1 - sys_common::unwind::try::try_fn::h7614151098073783683
  24:     0x7fa66f6dbd1b - __rust_try
  25:     0x7fa66f6d41fd - sys_common::unwind::inner_try::hadd81c754a64f07ciYt
  26:     0x7fa66fbc5b10 - boxed::F.FnBox<A>::call_box::h18261575856772421581
  27:     0x7fa66f6e5c59 - sys::thread::Thread::new::thread_start::h9bc812305b5e01feFPy
  28:     0x7fa6689af473 - start_thread
  29:     0x7fa66f35d69c - clone
  30:                0x0 - <unknown>

Could not compile `immeta`.

Caused by:
  Process didn't exit successfully: `rustc src/lib.rs --crate-name immeta --crate-type lib -g --out-dir /home/netvl/dev/lang/rust/projects/immeta/target/debug --emit=dep-info,link -L dependency=/home/netvl/dev/lang/rust/projects/immeta/target/debug -L dependency=/home/netvl/dev/lang/rust/projects/immeta/target/debug/deps --extern arrayvec=/home/netvl/dev/lang/rust/projects/immeta/target/debug/deps/libarrayvec-bcf06b3ef065493b.rlib --extern num_traits=/home/netvl/dev/lang/rust/projects/immeta/target/debug/deps/libnum_traits-a4000e09af4c8117.rlib --extern byteorder=/home/netvl/dev/lang/rust/projects/immeta/target/debug/deps/libbyteorder-4e8da61ace56de4d.rlib` (exit code: 101)

Here are the crate sources: immeta.zip

Apparently there is no such error on travis, so I think this may be caused by some weird interaction of rustc with rustup, but I don't know for sure.

rustc version:

% rustup run stable rustc -Vv
rustc 1.8.0 (db2939409 2016-04-11)
binary: rustc
commit-hash: db2939409db26ab4904372c82492cd3488e4c44e
commit-date: 2016-04-11
host: x86_64-unknown-linux-gnu
release: 1.8.0

cargo version:

% rustup run stable cargo --version
cargo 0.9.0-nightly (8fc3fd8 2016-02-29)

rustup version:

% rustup --version
rustup 0.1.12 (c6e430a 2016-05-12)

Metadata

Metadata

Assignees

Labels

I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions