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

empty_array.rs test removed because it ICEs on CI #4607

Open
Manishearth opened this issue Oct 1, 2019 · 6 comments
Open

empty_array.rs test removed because it ICEs on CI #4607

Manishearth opened this issue Oct 1, 2019 · 6 comments
Labels
C-bug Category: Clippy is not doing the correct thing I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@Manishearth
Copy link
Member

In #4606 I removed tests/ui/out_of_bounds_indexing/empty_array.rs because it was ICEing, but only on rustc CI (rust-lang/rust#64963 (comment))

We should restore the test when we figure out what's going on here. I've got a full rustc build ongoing in the background for now.

@Manishearth Manishearth added C-bug Category: Clippy is not doing the correct thing A-musing labels Oct 1, 2019
@mati865
Copy link
Contributor

mati865 commented Oct 1, 2019

It's not usual ICE but a failed assertion. You need to enable rustc debug-assertions to reproduce it.

For the reference it fails here:
https://github.com/rust-lang/rust/blob/702b45e409495a41afcccbe87a251a692b0cefab/src/librustc_mir/interpret/place.rs#L736-L737

@Manishearth
Copy link
Member Author

thread 'rustc' panicked at 'assertion failed: `(left == right)`
  left: `Size { raw: 0 }`,
 right: `Size { raw: 1 }`: Size mismatch when writing bits', src/librustc_mir/interpret/place.rs:736:21
stack backtrace:
   0: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
   1: core::fmt::write
   2: std::io::Write::write_fmt
   3: std::sys_common::backtrace::print
   4: std::panicking::default_hook::{{closure}}
   5: std::panicking::default_hook
   6: rustc_driver::report_ice
   7: std::panicking::rust_panic_with_hook
   8: std::panicking::continue_panic_fmt
   9: std::panicking::begin_panic_fmt
  10: rustc_mir::interpret::place::<impl rustc_mir::interpret::eval_context::InterpCx<M>>::write_immediate_no_validate
  11: rustc_mir::interpret::step::<impl rustc_mir::interpret::eval_context::InterpCx<M>>::eval_rvalue_into_place
  12: <rustc_mir::transform::const_prop::ConstPropagator as rustc::mir::visit::MutVisitor>::visit_statement
  13: <rustc_mir::transform::const_prop::ConstProp as rustc_mir::transform::MirPass>::run_pass
  14: rustc_mir::transform::run_passes
  15: rustc_mir::transform::run_optimization_passes
  16: rustc_mir::transform::optimized_mir
  17: rustc::ty::query::__query_compute::optimized_mir
  18: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::optimized_mir>::compute
  19: rustc::dep_graph::graph::DepGraph::with_task_impl
  20: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  21: <clippy_lints::implicit_return::ImplicitReturn as rustc::lint::LateLintPass>::check_fn
  22: <rustc::lint::context::LateLintPassObjects as rustc::lint::LateLintPass>::check_fn
  23: rustc::hir::intravisit::walk_item
  24: rustc::hir::intravisit::Visitor::visit_nested_item
  25: rustc::hir::intravisit::walk_crate
  26: rustc::lint::context::late_lint_pass_crate
  27: rustc::lint::context::late_lint_crate
  28: rustc::util::common::time
  29: rustc::util::common::time
  30: std::panicking::try::do_call
  31: __rust_maybe_catch_panic
  32: std::panicking::try
  33: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
  34: std::panicking::try::do_call
  35: __rust_maybe_catch_panic
  36: std::panicking::try
  37: rustc_interface::passes::analysis::{{closure}}
  38: rustc::util::common::time
  39: rustc_interface::passes::analysis
  40: rustc::ty::query::__query_compute::analysis
  41: rustc::dep_graph::graph::DepGraph::with_task_impl
  42: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  43: rustc_interface::passes::BoxedGlobalCtxt::access::{{closure}}
  44: rustc_interface::passes::create_global_ctxt::{{closure}}
  45: rustc_interface::interface::run_compiler_in_existing_thread_pool
  46: std::thread::local::LocalKey<T>::with
  47: scoped_tls::ScopedKey<T>::set
  48: syntax::with_globals
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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: rustc 1.40.0-dev running on x86_64-unknown-linux-gnu

note: compiler flags: -Z ui-testing -C prefer-dynamic

query stack during panic:
#0 [optimized_mir] processing `main`
#1 [analysis] running analysis passes on this crate
end of query stack
{"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}

------------------------------------------



failures:
    [ui] ui/out_of_bounds_indexing/empty_array.rs

test result: FAILED. 6 passed; 1 failed; 0 ignored; 0 measured; 344 filtered out

test compile_test ... FAILED

failures:

---- compile_test stdout ----
thread 'compile_test' panicked at 'Some tests failed', /home/manishearth/.cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/compiletest_rs-0.3.23/src/lib.rs:102:22
stack backtrace:
   0: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
   1: core::fmt::write
   2: std::io::Write::write_fmt
   3: std::io::impls::<impl std::io::Write for alloc::boxed::Box<W>>::write_fmt
   4: std::sys_common::backtrace::print
   5: std::panicking::default_hook::{{closure}}
   6: std::panicking::default_hook
   7: std::panicking::rust_panic_with_hook
   8: std::panicking::begin_panic
   9: compiletest_rs::run_tests
  10: core::ops::function::FnOnce::call_once
  11: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
  12: std::panicking::try::do_call
  13: __rust_maybe_catch_panic
  14: std::panicking::try
  15: test::run_test_in_process

@Manishearth
Copy link
Member Author

@oli-obk as far as I can tell the optimized_mir query (in implicit_return) is failing because we're calling it on code that doesn't consteval.

let mir = cx.tcx.optimized_mir(def_id);

Is this a rustc bug? Is it our fault for calling it so early? Should we be doing something else here to allow for failed MIR?

@oli-obk
Copy link
Contributor

oli-obk commented Oct 2, 2019

This is const prop cc @wesleywiser

@oli-obk
Copy link
Contributor

oli-obk commented Oct 2, 2019

let's see if rust-lang/rust#64991 fixes this, too

@phansch phansch self-assigned this Oct 4, 2019
bors added a commit that referenced this issue Oct 4, 2019
Revert "Remove tests that only ICE on CI"

This reverts commit 4318854.

If the integration tests pass, this closes #4607
@JohnTitor JohnTitor added the I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️ label Jan 2, 2020
@JohnTitor
Copy link
Member

Triage: it still happens on recent rustc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants