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

Internal compiler error, borrow checker? #15783

Closed
nwin opened this issue Jul 18, 2014 · 2 comments · Fixed by #17199
Closed

Internal compiler error, borrow checker? #15783

nwin opened this issue Jul 18, 2014 · 2 comments · Fixed by #17199
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@nwin
Copy link
Contributor

nwin commented Jul 18, 2014

I would like to give a nice minimal example this time but I have no idea which part of my code triggers this bug, it's a result of an internal api change which resulted in a lot of changes… :-(

$ RUST_BACKTRACE=1 rustc src/lib.rs 
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. 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
task 'rustc' failed at 'assertion failed: self.nodeid_to_index.contains_key(&id)', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/librustc/middle/dataflow.rs:286

stack backtrace:
   1:        0x11135dc18 - rt::backtrace::imp::write::h43147c4def9aa280Ffq
   2:        0x111361405 - failure::on_fail::h9c97bab6285818b6Yvq
   3:        0x1116141f9 - unwind::begin_unwind_inner::h9953e3233f8e8e31AXd
   4:        0x111613d87 - unwind::begin_unwind_fmt::h0aaa009accf3c8603Ud
   5:        0x10e6cc429 - middle::borrowck::build_borrowck_dataflow_data::hf038e5d9ffd145aevxP
   6:        0x10e6c8063 - middle::borrowck::borrowck_fn::h09c99839aac7c519ruP
   7:        0x10e6cb153 - visit::walk_method_helper::h15279296949109789107
   8:        0x10e6c8f35 - middle::borrowck::borrowck_item::h6998b8876678d119ytP
   9:        0x10e6c8f71 - middle::borrowck::borrowck_item::h6998b8876678d119ytP
  10:        0x10e6c91c1 - middle::borrowck::check_crate::hd53fa5b789f8aaadwmP
  11:        0x10e9d6233 - driver::driver::phase_3_run_analysis_passes::hca92301df3914a90dPt
  12:        0x10e9d0de1 - driver::driver::compile_input::h2a63d2105a548c23eBt
  13:        0x10ea84ab8 - driver::run_compiler::ha7f89b05ee9a4f7diIw
  14:        0x10ea82186 - driver::main_args::closure.$x22closure$x22$LP$134556$RP$
  15:        0x10ea9530b - task::TaskBuilder<S>::try_future::closure.$x22closure$x22$LP$135705$RP$
  16:        0x10ea95201 - task::TaskBuilder<S>::spawn_internal::closure.$x22closure$x22$LP$135682$RP$
  17:        0x11128963c - task::spawn_opts::closure.$x22closure$x22$LP$8270$RP$
  18:        0x11167936c - rust_try
  19:        0x111610f5b - unwind::try::h6c145dd9c626c3b6ZLd
  20:        0x111610cc3 - task::Task::run::h733761579f62e5f8RXc
  21:        0x1112894d1 - task::spawn_opts::closure.$x22closure$x22$LP$8215$RP$
  22:        0x111612f56 - thread::thread_start::h51c3f68f0794f335pkd
  23:     0x7fff82b49899 - _pthread_body
  24:     0x7fff82b4972a - _pthread_struct_init
@nwin
Copy link
Contributor Author

nwin commented Jul 18, 2014

Ok, I finally managed it.

pub fn foo(params: Option<&[&str]>) {}

fn main() {
    let name = "Foo";
    let msg = foo(Some(&[name.as_slice()]));
}

@ghost
Copy link

ghost commented Sep 11, 2014

Seems fine now but potentially needs a test.

@sfackler sfackler added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Sep 12, 2014
bors added a commit that referenced this issue Sep 15, 2014
…hton

Closes #7813.
Closes #10902.
Closes #11374.
Closes #11714.
Closes #12920.
Closes #13202.
Closes #13624.
Closes #14039.
Closes #15730.
Closes #15783.
bors added a commit to rust-lang-ci/rust that referenced this issue Nov 13, 2023
internal: Free up some disk space on auto-publish

`@bors` r+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. 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.

3 participants