Skip to content

ICE on invalid UTF-8 on stdin #22387

Closed
Closed
@a-p-

Description

@a-p-

Compiler version (running on OS X 10.10.1):

$ /usr/local/bin/rustc --version --verbose
rustc 1.0.0-nightly (b63cee4a1 2015-02-14 17:01:11 +0000)
binary: rustc
commit-hash: b63cee4a11fcfecf20ed8419bc3bd6859e6496bc
commit-date: 2015-02-14 17:01:11 +0000
host: x86_64-apple-darwin
release: 1.0.0-nightly
$ 

To reproduce the ICE:

$ echo -e '\xD2' | RUST_BACKTRACE=1 /usr/local/bin/rustc -
error: internal compiler error: unexpected panic
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 'called `Result::unwrap()` on an `Err` value: FromUtf8Error { bytes: [210, 10], error: InvalidByte(0) }', /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/src/libcore/result.rs:743

stack backtrace:
   1:        0x108844a77 - sys::backtrace::write::h159c9303aa56d993QnB
   2:        0x108870852 - failure::on_fail::h30a5d63a5824ccdbmFK
   3:        0x1087a8da8 - rt::unwind::begin_unwind_inner::h83398b7af9be1f1fCmK
   4:        0x1087a9511 - rt::unwind::begin_unwind_fmt::hfc0db89fc8ff3c8e8kK
   5:        0x10887035e - rust_begin_unwind
   6:        0x1088be757 - panicking::panic_fmt::haa2c8b833452fc7bSvw
   7:        0x104d4fa9c - run_compiler::hc6f18cb42f019cd65bc
   8:        0x104d4c6c2 - thunk::F.Invoke<A, R>::invoke::h879112612084553930
   9:        0x104d4b390 - rt::unwind::try::try_fn::h8170179712122257581
  10:        0x1088e81a9 - rust_try_inner
  11:        0x1088e8196 - rust_try
  12:        0x104d4ba89 - thunk::F.Invoke<A, R>::invoke::h7305889020475335315
  13:        0x10885a3e3 - sys::thread::thread_start::hdb5ed57d70bcc7bcoVF
  14:     0x7fff87abf2fc - _pthread_body
  15:     0x7fff87abf279 - _pthread_body

$ 

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.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