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 trying to compare incompatible constructors Single and Str #78643

Closed
catenacyber opened this issue Nov 1, 2020 · 1 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.

Comments

@catenacyber
Copy link

This is a first for me.
So, my report may not be perfect, but I am doing it since I read
we would appreciate a bug report

Code

The unminimized case is with Suricata
Way to reproduce it should be
install docker

git clone --depth 1 https://github.com/google/oss-fuzz
cd oss-fuzz
python infra/helper.py build_image suricata
python infra/helper.py build_fuzzers --sanitizer address --engine libfuzzer --architecture x86_64 suricata

Meta

rustc --version --verbose:

rustc 1.49.0-nightly (6bdae9edd 2020-10-29)
binary: rustc
commit-hash: 6bdae9edd0cc099daa6038bca469dc09b6fc078a
commit-date: 2020-10-29
host: x86_64-unknown-linux-gnu
release: 1.49.0-nightly

Error output

error: internal compiler error: compiler/rustc_mir_build/src/thir/pattern/_match.rs:931:18: trying to compare incompatible constructors Single and Str(Const { ty: &str, val: Value(Slice { data: Allocation { bytes: [80, 83, 69, 88, 69, 83, 86, 67], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [255], len: Size { raw: 8 } }, size: Size { raw: 8 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 8 }) })
 
thread 'rustc' panicked at 'Box<Any>', compiler/rustc_errors/src/lib.rs:942:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 
note: the compiler unexpectedly panicked. this is a bug.
 
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
 
note: rustc 1.49.0-nightly (ffe52882e 2020-10-30) running on x86_64-unknown-linux-gnu
 
note: compiler flags: -Z unstable-options -Z sanitizer=address -C opt-level=3 -C embed-bitcode=no -C debuginfo=2 -C debuginfo=1 -C force-frame-pointers --crate-type staticlib --crate-type rlib
 
note: some of the compiler flags provided by cargo are hidden
 
query stack during panic:
#0 [check_match] match-checking `smb::smb::SMBState::get_service_for_guid`
#1 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to previous error
 
error: could not compile `suricata`
Backtrace

thread 'rustc' panicked at 'Box<Any>', compiler/rustc_errors/src/lib.rs:945:9
stack backtrace:
   0: std::panicking::begin_panic
   1: rustc_errors::HandlerInner::bug
   2: rustc_errors::Handler::bug
   3: rustc_middle::util::bug::opt_span_bug_fmt::{{closure}}
   4: rustc_middle::ty::context::tls::with_opt::{{closure}}
   5: rustc_middle::ty::context::tls::with_opt
   6: rustc_middle::util::bug::opt_span_bug_fmt
   7: rustc_middle::util::bug::bug_fmt
   8: rustc_mir_build::thir::pattern::_match::Matrix::specialize_constructor
   9: <core::iter::adapters::Map<I,F> as core::iter::traits::iterator::Iterator>::try_fold
  10: rustc_mir_build::thir::pattern::_match::is_useful
  11: <core::iter::adapters::Map<I,F> as core::iter::traits::iterator::Iterator>::try_fold
  12: rustc_mir_build::thir::pattern::_match::is_useful
  13: <rustc_mir_build::thir::pattern::check_match::MatchVisitor as rustc_hir::intravisit::Visitor>::visit_expr
  14: <rustc_mir_build::thir::pattern::check_match::MatchVisitor as rustc_hir::intravisit::Visitor>::visit_expr
  15: rustc_hir::intravisit::walk_expr
  16: <rustc_mir_build::thir::pattern::check_match::MatchVisitor as rustc_hir::intravisit::Visitor>::visit_expr
  17: <rustc_mir_build::thir::pattern::check_match::MatchVisitor as rustc_hir::intravisit::Visitor>::visit_local
  18: rustc_hir::intravisit::walk_expr
  19: <rustc_mir_build::thir::pattern::check_match::MatchVisitor as rustc_hir::intravisit::Visitor>::visit_expr
  20: rustc_mir_build::thir::pattern::check_match::check_match
  21: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::check_match>::compute
  22: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  23: rustc_data_structures::stack::ensure_sufficient_stack
  24: rustc_query_system::query::plumbing::get_query_impl
  25: rustc_query_system::query::plumbing::ensure_query_impl
  26: rustc_interface::passes::analysis
  27: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::analysis>::compute
  28: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  29: rustc_middle::ty::query::plumbing::<impl rustc_query_system::query::QueryContext for rustc_middle::ty::context::TyCtxt>::start_query::{{closure}}::{{closure}}::{{closure}}
  30: rustc_query_system::query::plumbing::get_query_impl
  31: rustc_interface::passes::QueryContext::enter
  32: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  33: rustc_span::with_source_map
  34: scoped_tls::ScopedKey<T>::set
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

@catenacyber catenacyber added 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. labels Nov 1, 2020
@jonas-schievink
Copy link
Contributor

Duplicate of #78549

@jonas-schievink jonas-schievink marked this as a duplicate of #78549 Nov 1, 2020
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

2 participants