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

rustc panics (on some platforms?) when using termination_trait and returning Ok(()) #48389

Closed
U007D opened this issue Feb 21, 2018 · 6 comments
Closed
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@U007D
Copy link

U007D commented Feb 21, 2018

When using the termination_trait feature on Playground I found it panics:

Compiling playground v0.0.1 (file:///playground)
thread 'rustc' panicked at 'assertion failed: !substs.has_erasable_regions()', librustc_trans_utils/symbol_names.rs:192:9
note: Run with `RUST_BACKTRACE=1` for a 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.25.0-nightly (27a046e93 2018-02-18) running on x86_64-unknown-linux-gnu

error: Could not compile `playground`.

To learn more, run the command again with --verbose.

This above is code from the run-pass test, which passes when testing the compiler, and running the same code running locally on my machine (Ubuntu) compiles and runs successfully.

@shepmaster reports being able to repro the crash on his Mac OS X laptop.

@etaoins
Copy link
Contributor

etaoins commented Feb 21, 2018

I'm able to reproduce with 27a046e on mac OS 10.13.3

thread 'rustc' panicked at 'assertion failed: !substs.has_erasable_regions()', librustc_trans_utils/symbol_names.rs:192:9
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
   1: std::sys_common::backtrace::print
   2: std::panicking::default_hook::{{closure}}
   3: std::panicking::default_hook
   4: std::panicking::rust_panic_with_hook
   5: std::panicking::begin_panic
   6: rustc::util::common::record_time
   7: rustc_trans_utils::symbol_names::symbol_name
   8: rustc::ty::maps::<impl rustc::ty::maps::queries::symbol_name<'tcx>>::compute_result
   9: rustc::dep_graph::graph::DepGraph::with_task_impl
  10: rustc_errors::Handler::track_diagnostics
  11: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check
  12: rustc::ty::maps::<impl rustc::ty::maps::queries::symbol_name<'tcx>>::force
  13: rustc::ty::maps::<impl rustc::ty::maps::queries::symbol_name<'tcx>>::try_get
  14: rustc::ty::maps::TyCtxtAt::symbol_name
  15: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::symbol_name
  16: rustc_mir::monomorphize::item::MonoItemExt::symbol_name
  17: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter
  18: rustc_mir::monomorphize::assert_symbols_are_distinct
  19: rustc_trans::base::collect_and_partition_translation_items
  20: rustc::dep_graph::graph::DepGraph::with_task_impl
  21: rustc_errors::Handler::track_diagnostics
  22: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check
  23: rustc::ty::maps::<impl rustc::ty::maps::queries::collect_and_partition_translation_items<'tcx>>::force
  24: rustc::ty::maps::<impl rustc::ty::maps::queries::collect_and_partition_translation_items<'tcx>>::try_get
  25: rustc::ty::maps::TyCtxtAt::collect_and_partition_translation_items
  26: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::collect_and_partition_translation_items
  27: <rustc_trans::LlvmTransCrate as rustc_trans_utils::trans_crate::TransCrate>::trans_crate
  28: rustc::util::common::time
  29: rustc_driver::driver::phase_4_translate_to_llvm
  30: rustc_driver::driver::compile_input::{{closure}}
  31: <std::thread::local::LocalKey<T>>::with
  32: <std::thread::local::LocalKey<T>>::with
  33: rustc::ty::context::TyCtxt::create_and_enter
  34: rustc_driver::driver::compile_input
  35: rustc_driver::run_compiler

@shepmaster
Copy link
Member

I think the more useful point was this:

Specifically, the latest nightly has a commit hash of 4d90ac3, but your commit was e8f03b9. It appears no nightly has been created with your commit yet.

Have you verified that a nightly has since been created with the right commit?

@etaoins
Copy link
Contributor

etaoins commented Feb 21, 2018

I was running 27a046e from Git which includes e8f03b9

@pietroalbini pietroalbini added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Feb 27, 2018
@sinkuu
Copy link
Contributor

sinkuu commented Apr 6, 2018

This is a duplicate of #48890 - note the difference of Box<io::Error> (used in run-pass test) and Box<error::Error> (used in playground). The former does not cause ICE.

@U007D
Copy link
Author

U007D commented Apr 6, 2018

@sinkuu re: duplicate: note #48890 was opened on Mar. 9th. That said, which issue is used to track the bug doesn't matter to me so long as we are moving toward a fix.

@frewsxcv
Copy link
Member

frewsxcv commented Apr 7, 2018

Closing in favor of #48890

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants