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

Compiler panic - assertion failed: !self.has_escaping_regions() #26638

Closed
saarw opened this issue Jun 28, 2015 · 5 comments
Closed

Compiler panic - assertion failed: !self.has_escaping_regions() #26638

saarw opened this issue Jun 28, 2015 · 5 comments
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@saarw
Copy link

saarw commented Jun 28, 2015

Compiler panic. Found an ealier issue in the same file that had been closed because the problem had gone away in later compiles. This is the stable 1.1 though.

Version info
rustc 1.1.0 (35ceea3 2015-06-19)
binary: rustc
commit-hash: 35ceea3
commit-date: 2015-06-19
host: x86_64-pc-windows-gnu
release: 1.1.0

RUST_BACKTRACE=1 rustc --verbose src/main.rs
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
note: run with RUST_BACKTRACE=1 for a backtrace
thread 'rustc' panicked at 'assertion failed: !self.has_escaping_regions()', C:/bot/slave/stable-dist-rustc-win-gnu-64/build/src/librustc\middle\ty.rs:2123

stack backtrace:
1: 0x6f138a02 - sys::backtrace::write::hb142593d131303b10fs
2: 0x6f141e76 - rt::unwind::register::h2f2891f465b0e536sNv
3: 0x6f1053c0 - rt::unwind::begin_unwind_inner::he5d025d7f655ecaaCKv
4: 0x6d08989e - middle::astencode::rbml..Doc<'a>.doc_decoder_helpers::opt_child::hd6aba4d7b00f0fc9UKb
5: 0x6d1c0773 - middle::traits::fulfill::FulfillmentContext<'tcx>::register_builtin_bound::h1fba927ecfad50a9DEO
6: 0x6a93c978 - check::FnCtxt<'a, 'tcx>.mc..Typer<'tcx>::is_method_call::hb206e83d494db5a0Akn
7: 0x6a948ac8 - check::FnCtxt<'a, 'tcx>.AstConv<'tcx>::projected_ty::he778b71de0699925wAo
8: 0x6a95effc - check::CheckItemBodiesVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::h49b5aaa3aec9c80dWrn
9: 0x6a95d1df - check::CheckItemBodiesVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::h49b5aaa3aec9c80dWrn
10: 0x6aa187ab - check_crate::hf98f1f239eb0b1afsJC
11: 0x6aa11f75 - check_crate::hf98f1f239eb0b1afsJC
12: 0x6701f3dd - driver::phase_3_run_analysis_passes::h5d9dbc988e0fcdbatGa
13: 0x67002b40 - driver::compile_input::h66ba80b489f2ef28Qba
14: 0x670b5913 - run_compiler::hf1308c7d75cfa1a775b
15: 0x670b349f - run::h99d8d2bce2d42189N5b
16: 0x670b2a59 - run::h99d8d2bce2d42189N5b
17: 0x6f17b5bc - rust_try
18: 0x6f17b599 - rust_try
19: 0x670b2cd5 - run::h99d8d2bce2d42189N5b
20: 0x6f140134 - sys::process::Command::cwd::hecbd2393e1ca7c52luu
21: 0x776659cd - BaseThreadInitThunk

@arielb1
Copy link
Contributor

arielb1 commented Jun 28, 2015

Does this reproduce on 1.2.0 (or nightly)? If not, could you provide us the source?

@huonw huonw added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Jun 28, 2015
@saarw
Copy link
Author

saarw commented Jun 28, 2015

Here is the trace from 1.3.0 nightly

$ RUST_BACKTRACE=1 rustc src/main.rs
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 'assertion failed: !self.has_escaping_regions()', ../src/librustc\middle\ty.rs:2538

stack backtrace:
1: 0x61df90f5 - sys::backtrace::write::h025f886ce4157216LAs
2: 0x61e0289c - rt::unwind::register::h5ad63c24fb31bf08qfw
3: 0x61dc561f - rt::unwind::begin_unwind_inner::hfc1332db90d09e50zcw
4: 0x62b020a1 - ast_map::blocks::FnLikeNode<'a>::span::h1346adb0a4777beb6la
5: 0x62c407e7 - middle::traits::fulfill::FulfillmentContext<'tcx>::register_builtin_bound::h0240d1632b27a890lQQ
6: 0x65ced8 - check::FnCtxt<'a, 'tcx>::register_builtin_bound::hd5aad55bf7cc8d8f3gp
7: 0x668323 - check::FnCtxt<'a, 'tcx>.AstConv<'tcx>::projected_ty::hdc00f6a7d4296791wPo
8: 0x67fee0 - check::check_item_types::hb3ee80cdf5eb8214PGn
9: 0x67def6 - check::check_item_body::hb38de46670b707eeO9n
10: 0x67fb44 - check::check_item_types::hb3ee80cdf5eb8214PGn
11: 0x739bf2 - check_crate::hce053460bc728452w0C
12: 0x71068b49 - driver::assign_node_ids_and_map::h20e96495a90b7e774Da
13: 0x71066f94 - driver::assign_node_ids_and_map::h20e96495a90b7e774Da
14: 0x71061489 - driver::assign_node_ids_and_map::h20e96495a90b7e774Da
15: 0x71042a66 - driver::compile_input::h91e7a1382123c763Tba
16: 0x711249dd - run_compiler::h17dcf0c216b2a22fw7b
17: 0x71122665 - run::hac58755e8f0fd206c7b
18: 0x71121fa9 - run::hac58755e8f0fd206c7b
19: 0x61e3d54c - rust_try
20: 0x61e3d529 - rust_try
21: 0x61ded4c5 - rt::unwind::try::inner_try::hbdd1fe1d49ddad43s8v
22: 0x71122167 - run::hac58755e8f0fd206c7b
23: 0x61e003f4 - sys::process::Command::cwd::h4194821e987e71efwUu
24: 0x775159cd - BaseThreadInitThunk

@saarw
Copy link
Author

saarw commented Jun 28, 2015

Uploaded the code that produces the problem here
https://github.com/wsaar/fragments/blob/master/rust-issue-26638_main.rs

@eefriedman
Copy link
Contributor

Reduces to

fn parse_type(iter: Iterator<Item=&str>) -> (&str, usize) { panic!() }
fn main() {}

@eefriedman
Copy link
Contributor

I think I've tracked this down to a bug in ty::accumulate_lifetimes_in_type: it ignores the trait's Binder, and therefore returns a region with the wrong De Bruijn index. @nikomatsakis , you were the last one to touch this, I think?

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

4 participants