Skip to content

thread 'rustc' panicked at 'Box<Any>' #24533

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
ldanko opened this issue Apr 17, 2015 · 1 comment
Closed

thread 'rustc' panicked at 'Box<Any>' #24533

ldanko opened this issue Apr 17, 2015 · 1 comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@ldanko
Copy link

ldanko commented Apr 17, 2015

Hi, I got following message from rustc:
error: internal compiler error: trans_local_var: no datum for local/arg 52 found
(...)
thread 'rustc' panicked at 'Box<Any>', /home/rustbuild/src/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:190

I tried this code:

use std::slice::Iter;
use std::io::{Error, ErrorKind, Result};
use std::vec::*;

fn foo(it : &mut Iter<u8>) -> Result<u8> {
    Ok(*it.next().unwrap())
}

fn bar() -> Result<u8> {

    let data : Vec<u8> = Vec::new();

    if true {
        return Err(Error::new(ErrorKind::NotFound, "msg"));
    }

    let mut it = data.iter();
    foo(&mut it)
}

fn main() {
    bar();
}

Meta

rustc --version --verbose:

rustc 1.0.0-beta (9854143cb 2015-04-02) (built 2015-04-02)
binary: rustc
commit-hash: 9854143cba679834bc4ef932858cd5303f015a0e
commit-date: 2015-04-02
build-date: 2015-04-02
host: x86_64-unknown-linux-gnu
release: 1.0.0-beta

Backtrace:

stack backtrace:
   1:     0x7fb71a0c93c8 - sys::backtrace::write::h179e141147f9ee14IJC
   2:     0x7fb71a0f4770 - panicking::on_panic::h6aa569d33389f0cfsXI
   3:     0x7fb71a02c4a3 - rt::unwind::begin_unwind_inner::h082f07869f4b9731ACI
   4:     0x7fb7173cb04d - rt::unwind::begin_unwind::h13428428822164950735
   5:     0x7fb7173cb7a2 - diagnostic::Handler::bug::h7dec5f2940917255ZsB
   6:     0x7fb717dde82b - session::Session::bug::hc743ab3e9fbf0b0bnYq
   7:     0x7fb719755d78 - trans::expr::trans_local_var::hd7325e6f6b345fc2NMi
   8:     0x7fb71974c591 - trans::expr::trans_def::h2fd28f24ac3b6462rli
   9:     0x7fb719738ce5 - trans::expr::trans_unadjusted::hf93051714e2bb83eTXh
  10:     0x7fb7196f01d4 - trans::expr::trans::hbf5d4a994a92ed5cBlh
  11:     0x7fb71974fbd7 - trans::expr::trans_addr_of::h0dfef189387720cdfij
  12:     0x7fb719738f0f - trans::expr::trans_unadjusted::hf93051714e2bb83eTXh
  13:     0x7fb7196f01d4 - trans::expr::trans::hbf5d4a994a92ed5cBlh
  14:     0x7fb719727b1f - trans::callee::trans_args::he3daf042a35667489Rg
  15:     0x7fb71972e5b4 - trans::callee::trans_call_inner::h3731959168429002038
  16:     0x7fb71973ae13 - trans::expr::trans_rvalue_dps_unadjusted::hddd412622c9b115fmti
  17:     0x7fb7196ee868 - trans::expr::trans_into::h6740c9e159fab14cgfh
  18:     0x7fb7196ef8d2 - trans::controlflow::trans_block::hca8dabb22968b279H6d
  19:     0x7fb7197c65bf - trans::base::trans_closure::h2b9d4a88090cb2c4Qtt
  20:     0x7fb7196d8506 - trans::base::trans_fn::h13eecdaa7f8f7dbfzEt
  21:     0x7fb7196d319f - trans::base::trans_item::hcd09515ced7a23baP2t
  22:     0x7fb7197ceafc - trans::base::trans_crate::hdffc9e3841dc9fb5lZu
  23:     0x7fb71a754bbf - driver::phase_4_translate_to_llvm::hfb4ae79c3a76d704aOa
  24:     0x7fb71a72c60b - driver::compile_input::h7c62c2870ff901f6Qba
  25:     0x7fb71a7e3a25 - run_compiler::hc815b49ce638c28eV4b
  26:     0x7fb71a7e133d - boxed::F.FnBox<A>::call_box::h4290333406520961126
  27:     0x7fb71a7e0879 - rt::unwind::try::try_fn::h13999576404798567721
  28:     0x7fb71a170c68 - rust_try_inner
  29:     0x7fb71a170c55 - rust_try
  30:     0x7fb71a7e0b4b - boxed::F.FnBox<A>::call_box::h14489442628055152240
  31:     0x7fb71a0df781 - sys::thread::create::thread_start::h02b7da32b4d7a4aaExH
  32:     0x7fb713ea86a9 - start_thread
  33:     0x7fb719c96eec - __clone
  34:                0x0 - <unknown>
@steveklabnik steveklabnik added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Apr 18, 2015
@bytwise
Copy link
Contributor

bytwise commented Apr 20, 2015

This compiles fine on rustc 1.0.0-nightly (1284be404 2015-04-18) (built 2015-04-17)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

3 participants