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

ICE on nightly when compiling rust-dispatch #71867

Closed
ryanisaacg opened this issue May 4, 2020 · 3 comments
Closed

ICE on nightly when compiling rust-dispatch #71867

ryanisaacg opened this issue May 4, 2020 · 3 comments
Labels
A-const-eval Area: Constant evaluation (MIR interpretation) C-bug Category: This is a bug. 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.

Comments

@ryanisaacg
Copy link

Code

#[repr(C)]
pub struct dispatch_object_s { _private: [u8; 0] }

extern {
    static _dispatch_queue_attr_concurrent: dispatch_object_s;
}

pub static DISPATCH_QUEUE_CONCURRENT: &'static dispatch_object_s = unsafe { &_dispatch_queue_attr_concurrent };

Meta

rustc --version --verbose:

rustc 1.42.0 (b8cedc004 2020-03-09)
binary: rustc
commit-hash: b8cedc00407a4c56a3bda1ed605c6fc166655447
commit-date: 2020-03-09
host: x86_64-apple-darwin
release: 1.42.0
LLVM version: 9.0

Error output

error: internal compiler error: src/librustc_mir/interpret/validity.rs:396: Unexpected error during ptr inbounds test: cannot read from foreign (extern) static DefId(0:7 ~ playground[ae9d]::[0]::_dispatch_queue_attr_concurrent[0])

thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:907:9
Backtrace

stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/git.luolix.top-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/git.luolix.top-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:78
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:59
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1069
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1532
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:62
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:198
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:218
  10: rustc_driver::report_ice
  11: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:481
  12: std::panicking::begin_panic
  13: rustc_errors::HandlerInner::bug
  14: rustc_errors::Handler::bug
  15: rustc_middle::util::bug::opt_span_bug_fmt::{{closure}}
  16: rustc_middle::ty::context::tls::with_opt::{{closure}}
  17: rustc_middle::ty::context::tls::with_opt
  18: rustc_middle::util::bug::opt_span_bug_fmt
  19: rustc_middle::util::bug::bug_fmt
  20: rustc_mir::interpret::validity::ValidityVisitor<M>::check_safe_pointer
  21: rustc_mir::interpret::validity::ValidityVisitor<M>::try_visit_primitive
  22: rustc_mir::interpret::validity::<impl rustc_mir::interpret::eval_context::InterpCx<M>>::validate_operand_internal
  23: rustc_mir::const_eval::eval_queries::const_eval_validated_provider
  24: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::const_eval_validated>::compute
  25: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  26: rustc_query_system::query::plumbing::get_query_impl
  27: rustc_mir::const_eval::eval_queries::const_eval_validated_provider
  28: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::const_eval_validated>::compute
  29: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  30: rustc_query_system::query::plumbing::get_query_impl
  31: rustc_middle::mir::interpret::queries::<impl rustc_middle::ty::context::TyCtxt>::const_eval_global_id
  32: rustc_middle::mir::interpret::queries::<impl rustc_middle::ty::context::TyCtxt>::const_eval_poly
  33: <rustc_lint::BuiltinCombinedLateLintPass as rustc_lint::passes::LateLintPass>::check_item
  34: rustc_hir::intravisit::Visitor::visit_nested_item
  35: rustc_hir::intravisit::walk_crate
  36: rustc_lint::late::late_lint_crate
  37: rustc_data_structures::sync::join
  38: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
  39: rustc_session::utils::<impl rustc_session::session::Session>::time
  40: rustc_interface::passes::analysis
  41: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::analysis>::compute
  42: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  43: rustc_query_system::query::plumbing::get_query_impl
  44: rustc_middle::ty::context::tls::enter_global
  45: rustc_interface::interface::run_compiler_in_existing_thread_pool
  46: scoped_tls::ScopedKey<T>::set
  47: rustc_ast::attr::with_globals

@ryanisaacg ryanisaacg 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 May 4, 2020
@LeSeulArtichaut LeSeulArtichaut added A-const-eval Area: Constant evaluation (MIR interpretation) regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. labels May 4, 2020
@LeSeulArtichaut
Copy link
Contributor

Ran cargo-bisect-rustc:

searched nightlies: from nightly-2020-04-25 to nightly-2020-04-27
regressed nightly: nightly-2020-04-27
searched commits: from 0862458 to e83f756
regressed commit: b592b37 (#71566)

I'd say the culprit PR is #71140 (cc @oli-obk) but I don't know if it could also be #71392.

@LeSeulArtichaut LeSeulArtichaut added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label May 4, 2020
@LeSeulArtichaut
Copy link
Contributor

This seems a lot like a duplicate of #71612 though

yvt added a commit to yvt/Stella2 that referenced this issue May 4, 2020
The latest available version is nightly-2020-04-30, but we can't use
this because of <rust-lang/rust#71867>.
@jonas-schievink
Copy link
Contributor

Closing as duplicate.

@LeSeulArtichaut LeSeulArtichaut removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-const-eval Area: Constant evaluation (MIR interpretation) C-bug Category: This is a bug. 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.
Projects
None yet
Development

No branches or pull requests

3 participants