Skip to content

compiler panic cat_expr_unadjusted Errd (used to work) #41498

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
wagnerf42 opened this issue Apr 24, 2017 · 6 comments · Fixed by #41578
Closed

compiler panic cat_expr_unadjusted Errd (used to work) #41498

wagnerf42 opened this issue Apr 24, 2017 · 6 comments · Fixed by #41578
Assignees
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-high High priority regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@wagnerf42
Copy link

wagnerf42 commented Apr 24, 2017

hi, my code used to compile last week.
I updated the compiler today and now it crashes
note that you can get my code here (https://github.com/wagnerf42/Jimn/tree/master/rust/jimn)

~/c/J/r/jimn ❯❯❯ rustup update                                                                                       ⏎
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'

  nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.18.0-nightly (2bd4b5c6d 2017-04-23)

~/c/J/r/jimn ❯❯❯ export RUST_BACKTRACE=1

~/c/J/r/jimn ❯❯❯ cargo run --example bentley_ottmann ./tests_bentley_ottmann/overlap.bo
   Compiling jimn v0.1.0 (file:///home/wagnerf/code/Jimn/rust/jimn)
error: internal compiler error: cat_expr_unadjusted Errd
   --> src/bentley_ottmann.rs:165:9
    |
165 | /         self.events_data
166 | |             .entry(event_point)
167 | |             .or_insert_with(|| {
168 | |                                 events.push(event_point);
169 | |                                 [HashSet::new(), HashSet::new()]
170 | |                             })
171 | |             [event_type]
    | |________________________^

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 'Box<Any>', /checkout/src/librustc_errors/lib.rs:375
stack backtrace:
   0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
             at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at /checkout/src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at /checkout/src/libstd/sys_common/backtrace.rs:60
             at /checkout/src/libstd/panicking.rs:355
   3: std::panicking::default_hook
             at /checkout/src/libstd/panicking.rs:365
   4: std::panicking::rust_panic_with_hook
             at /checkout/src/libstd/panicking.rs:549
   5: std::panicking::begin_panic
   6: rustc_errors::Handler::abort_if_errors
   7: rustc_passes::consts::check_crate
   8: rustc_driver::driver::phase_3_run_analysis_passes::{{closure}}
   9: rustc::ty::context::TyCtxt::create_and_enter
  10: rustc_driver::driver::phase_3_run_analysis_passes
  11: rustc_driver::driver::compile_input
  12: rustc_driver::run_compiler
  13: std::panicking::try::do_call
  14: __rust_maybe_catch_panic
             at /checkout/src/libpanic_unwind/lib.rs:98
  15: <F as alloc::boxed::FnBox<A>>::call_box
  16: std::sys::imp::thread::Thread::new::thread_start
             at /checkout/src/liballoc/boxed.rs:650
             at /checkout/src/libstd/sys_common/thread.rs:21
             at /checkout/src/libstd/sys/unix/thread.rs:84
  17: start_thread
  18: clone

error: Could not compile `jimn`.
@wagnerf42
Copy link
Author

note: going back to nightly-2017-04-01; everything work again. 'nightly-2017-04-17 is not ok. so troubles started somewhere in between.

@arielb1 arielb1 changed the title compiler panic Box<Any> (used to work) compiler panic cat_expr_unadjusted Errd (used to work) Apr 24, 2017
@arielb1 arielb1 added regression-from-stable-to-stable Performance or correctness regression from one stable version to another. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. and removed regression-from-stable-to-stable Performance or correctness regression from one stable version to another. labels Apr 24, 2017
@eddyb
Copy link
Member

eddyb commented Apr 25, 2017

cc @nikomatsakis

@wagnerf42
Copy link
Author

not too sure what to do with this message.
can I help you with something ? I can do a small dichotomy to figure out the last working nightly if this can help.

@alexcrichton alexcrichton added regression-from-stable-to-beta Performance or correctness regression from stable to beta. and removed regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. labels Apr 26, 2017
@arielb1
Copy link
Contributor

arielb1 commented Apr 27, 2017

Minified:

struct S;
impl S {
    fn mutate(&mut self) {}
}

fn call_and_ref<T, F: FnOnce() -> T>(x: &mut Option<T>, f: F) -> &mut T {
    *x = Some(f());
    x.as_mut().unwrap()
}

fn main() {
    let mut n = None;
    call_and_ref(&mut n, || [S])[0].mutate();
}

arielb1 pushed a commit to arielb1/rust that referenced this issue Apr 27, 2017
typeck: resolve type vars before calling `try_index_step`

`try_index_step` does not resolve type variables by itself and would
fail otherwise. Also harden the failure path in `confirm` to cause less
confusing errors.

r? @eddyb

Fixes rust-lang#41498.

beta-nominating because regression (caused by rust-lang#41279).
frewsxcv added a commit to frewsxcv/rust that referenced this issue Apr 27, 2017
typeck: resolve type vars before calling `try_index_step`

`try_index_step` does not resolve type variables by itself and would
fail otherwise. Also harden the failure path in `confirm` to cause less
confusing errors.

r? @eddyb

Fixes rust-lang#41498.

beta-nominating because regression (caused by rust-lang#41279).
@nikomatsakis
Copy link
Contributor

@wagnerf42 there is a pending fix (#41578), no action needed on your part

@nikomatsakis
Copy link
Contributor

triage: P-high

@rust-highfive rust-highfive added the P-high High priority label Apr 27, 2017
frewsxcv added a commit to frewsxcv/rust that referenced this issue Apr 27, 2017
typeck: resolve type vars before calling `try_index_step`

`try_index_step` does not resolve type variables by itself and would
fail otherwise. Also harden the failure path in `confirm` to cause less
confusing errors.

r? @eddyb

Fixes rust-lang#41498.

beta-nominating because regression (caused by rust-lang#41279).
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-high High priority regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants