Skip to content
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

LLVM assertion: assertion failed: index < LLVMCountParams(llfn) #20575

Closed
japaric opened this issue Jan 5, 2015 · 0 comments · Fixed by #21066
Closed

LLVM assertion: assertion failed: index < LLVMCountParams(llfn) #20575

japaric opened this issue Jan 5, 2015 · 0 comments · Fixed by #21066
Labels
A-closures Area: Closures (`|…| { … }`) I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@japaric
Copy link
Member

japaric commented Jan 5, 2015

STR

// reduced version of `test_collect` in src/coretest/{option,result}.rs

fn main() {
    let functions: [Box<Fn() -> Option<()>>; 1] = [box || None];

    let _: Option<Vec<()>> = functions.iter().map(|f| (*f)()).collect();
}

Backtrace

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 'assertion failed: index < LLVMCountParams(llfn)', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustc_llvm/lib.rs:2180

stack backtrace:
   1:     0x7fc7bb7bd920 - sys::backtrace::write::h36422e877a8b3158yQs
   2:     0x7fc7bb7e3650 - failure::on_fail::hde5005d61795902da3y
   3:     0x7fc7bb7494a0 - rt::unwind::begin_unwind_inner::ha0668a3a9d73b9a7RHy
   4:     0x7fc7b74729d0 - rt::unwind::begin_unwind::h14477328803464112959
   5:     0x7fc7b74738c0 - get_param::hc2a602389748493aHZc
   6:     0x7fc7ba71e3e0 - trans::meth::trans_object_shim::h5f4a45036c920561jBz
   7:     0x7fc7ba624420 - trans::meth::trans_method_callee::h5b6017c8ff0cdabeq6y
   8:     0x7fc7ba68de30 - trans::callee::trans_call_inner::h9570217261815687510
   9:     0x7fc7ba6547f0 - trans::expr::trans_rvalue_dps_unadjusted::he4bc827113312f77JWi
  10:     0x7fc7ba60d640 - trans::expr::trans_into::hc0349db49beb27737xh
  11:     0x7fc7ba60ddd0 - trans::controlflow::trans_block::h174785cd924262f8S1d
  12:     0x7fc7ba6d90a0 - trans::base::trans_closure::hfe41dcc40403de39MSt
  13:     0x7fc7ba6547f0 - trans::expr::trans_rvalue_dps_unadjusted::he4bc827113312f77JWi
  14:     0x7fc7ba653630 - trans::expr::trans_unadjusted::h92a64e3d533ab991qki
  15:     0x7fc7ba60e940 - trans::expr::trans::h6c51adc6031aa4b0BBh
  16:     0x7fc7ba61d0f0 - trans::callee::trans_args::h1c22cd35a1fbcd555bh
  17:     0x7fc7ba650d40 - trans::callee::trans_call_inner::h526206399124275916
  18:     0x7fc7ba6547f0 - trans::expr::trans_rvalue_dps_unadjusted::he4bc827113312f77JWi
  19:     0x7fc7ba653630 - trans::expr::trans_unadjusted::h92a64e3d533ab991qki
  20:     0x7fc7ba60e940 - trans::expr::trans::h6c51adc6031aa4b0BBh
  21:     0x7fc7ba61d0f0 - trans::callee::trans_args::h1c22cd35a1fbcd555bh
  22:     0x7fc7ba650d40 - trans::callee::trans_call_inner::h526206399124275916
  23:     0x7fc7ba6547f0 - trans::expr::trans_rvalue_dps_unadjusted::he4bc827113312f77JWi
  24:     0x7fc7ba653630 - trans::expr::trans_unadjusted::h92a64e3d533ab991qki
  25:     0x7fc7ba60e940 - trans::expr::trans::h6c51adc6031aa4b0BBh
  26:     0x7fc7ba60cc40 - trans::base::init_local::h47b20c6d8c11ad44V1s
  27:     0x7fc7ba60ddd0 - trans::controlflow::trans_block::h174785cd924262f8S1d
  28:     0x7fc7ba6d90a0 - trans::base::trans_closure::hfe41dcc40403de39MSt
  29:     0x7fc7ba5f9040 - trans::base::trans_fn::h6d916c16d129710bj3t
  30:     0x7fc7ba5f4240 - trans::base::trans_item::h2031a94ddea1dc4daqu
  31:     0x7fc7ba6e1b50 - trans::base::trans_crate::ha120df8a851d469bvlv
  32:     0x7fc7bbd0d210 - driver::phase_4_translate_to_llvm::ha02a86bcc78503d8uFa
  33:     0x7fc7bbcecaa0 - driver::compile_input::h8d0abf631800220evba
  34:     0x7fc7bbdb8070 - thunk::F.Invoke<A, R>::invoke::h13263903969514368718
  35:     0x7fc7bbdb6e20 - rt::unwind::try::try_fn::h2272437873322108176
  36:     0x7fc7bb8478b0 - rust_try_inner
  37:     0x7fc7bb8478a0 - rust_try
  38:     0x7fc7bbdb7170 - thunk::F.Invoke<A, R>::invoke::h17236552692728063371
  39:     0x7fc7bb7cf490 - sys::thread::thread_start::hd19c7749b7af23e8EGv
  40:     0x7fc7b5e47250 - start_thread
  41:     0x7fc7bb404219 - clone
  42:                0x0 - <unknown>

Version

rustc 0.13.0-nightly (ad9e75938 2015-01-05 00:26:28 +0000)

cc @nikomatsakis

@huonw huonw added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ A-closures Area: Closures (`|…| { … }`) labels Jan 5, 2015
japaric pushed a commit to japaric/rust that referenced this issue Jan 12, 2015
bors added a commit that referenced this issue Jan 14, 2015
add test for issue #20575

Reviewed-by: alexcrichton
bors added a commit that referenced this issue Jan 14, 2015
add test for issue #20575

Reviewed-by: alexcrichton
bors added a commit that referenced this issue Jan 15, 2015
add test for issue #20575

Reviewed-by: alexcrichton
bors added a commit that referenced this issue Jan 15, 2015
add test for issue #20575

Reviewed-by: alexcrichton
alexcrichton added a commit to alexcrichton/rust that referenced this issue Jan 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-closures Area: Closures (`|…| { … }`) I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants