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

Compilation panicked #63434

Closed
gcao opened this issue Aug 10, 2019 · 3 comments
Closed

Compilation panicked #63434

gcao opened this issue Aug 10, 2019 · 3 comments
Labels
A-borrow-checker Area: The borrow checker C-bug Category: This is a bug. fixed-by-NLL Bugs fixed, but only when NLL is enabled. 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

@gcao
Copy link

gcao commented Aug 10, 2019

Compilation exited abnormally when compiling this code
I know my code has a lot of issues but the compiler should either pass or fail instead of panicking

Steps to reproduce
git clone https://github.com/gcao/gene.rs.git
cd gene.rs
git checkout f861fba0d25f6a6de2f01a680bd39eebcf40b7e2
cargo build

The previous commit compiles fine. The changes in the commit can be found here:
gcao/gene.rs@f861fba

stack backtrace:
0: std::panicking::default_hook::{{closure}}
1: std::panicking::default_hook
0: std::panicking::default_hook::{{closure}}
1: std::panicking::default_hook
2: rustc::util::common::panic_hook
2: rustc::util::common::panic_hook
3: std::panicking::rust_panic_with_hook
3: std::panicking::rust_panic_with_hook
4: std::panicking::begin_panic
5: rustc_borrowck::borrowck::check_loans::CheckLoanCtxt::report_error_if_loans_conflict
4: std::panicking::begin_panic
6: rustc_borrowck::dataflow::DataFlowContext::each_bit_on_entry
5: rustc_borrowck::borrowck::check_loans::CheckLoanCtxt::report_error_if_loans_conflict
7: <rustc_borrowck::borrowck::check_loans::CheckLoanCtxt as rustc::middle::expr_use_visitor::Delegate>::borrow
6: rustc_borrowck::dataflow::DataFlowContext::each_bit_on_entry
7: <rustc_borrowck::borrowck::check_loans::CheckLoanCtxt as rustc::middle::expr_use_visitor::Delegate>::borrow
8: rustc::middle::expr_use_visitor::ExprUseVisitor::walk_expr
9: rustc::middle::expr_use_visitor::ExprUseVisitor::consume_expr
8: rustc::middle::expr_use_visitor::ExprUseVisitor::walk_expr
10: rustc::middle::expr_use_visitor::ExprUseVisitor::walk_expr
9: rustc::middle::expr_use_visitor::ExprUseVisitor::consume_expr
11: rustc::middle::expr_use_visitor::ExprUseVisitor::consume_expr
10: rustc::middle::expr_use_visitor::ExprUseVisitor::walk_expr
12: rustc::middle::expr_use_visitor::ExprUseVisitor::walk_expr
11: rustc::middle::expr_use_visitor::ExprUseVisitor::consume_expr
13: rustc::middle::expr_use_visitor::ExprUseVisitor::consume_expr
12: rustc::middle::expr_use_visitor::ExprUseVisitor::walk_expr
14: rustc::middle::expr_use_visitor::ExprUseVisitor::walk_expr
13: rustc::middle::expr_use_visitor::ExprUseVisitor::consume_expr
15: rustc::middle::expr_use_visitor::ExprUseVisitor::consume_expr
16: rustc_borrowck::borrowck::check_loans::check_loans
14: rustc::middle::expr_use_visitor::ExprUseVisitor::walk_expr
17: rustc_borrowck::borrowck::borrowck
15: rustc::middle::expr_use_visitor::ExprUseVisitor::consume_expr
16: rustc_borrowck::borrowck::check_loans::check_loans
17: rustc_borrowck::borrowck::borrowck
18: rustc::ty::query::__query_compute::borrowck
18: rustc::ty::query::__query_compute::borrowck
19: rustc::ty::query::::compute
19: rustc::ty::query::::compute
20: rustc::dep_graph::graph::DepGraph::with_task_impl
20: rustc::dep_graph::graph::DepGraph::with_task_impl
21: rustc::ty::query::plumbing::::get_query
22: rustc_mir::borrow_check::do_mir_borrowck
21: rustc::ty::query::plumbing::::get_query
23: rustc::ty::context::GlobalCtxt::enter_local
22: rustc_mir::borrow_check::do_mir_borrowck
24: rustc_mir::borrow_check::mir_borrowck
23: rustc::ty::context::GlobalCtxt::enter_local
24: rustc_mir::borrow_check::mir_borrowck
25: rustc::ty::query::__query_compute::mir_borrowck
26: rustc::ty::query::::compute
27: rustc::dep_graph::graph::DepGraph::with_task_impl
25: rustc::ty::query::__query_compute::mir_borrowck
28: rustc::ty::query::plumbing::::get_query
26: rustc::ty::query::::compute
29: rustc::ty::::par_body_owners
27: rustc::dep_graph::graph::DepGraph::with_task_impl
28: rustc::ty::query::plumbing::::get_query
30: rustc::util::common::time
31: rustc_interface::passes::analysis
29: rustc::ty::::par_body_owners
30: rustc::util::common::time
31: rustc_interface::passes::analysis
32: rustc::ty::query::__query_compute::analysis
32: rustc::ty::query::__query_compute::analysis
33: rustc::ty::query::::compute
33: rustc::ty::query::::compute
34: rustc::dep_graph::graph::DepGraph::with_task_impl
35: rustc::ty::query::plumbing::::get_query
34: rustc::dep_graph::graph::DepGraph::with_task_impl
35: rustc::ty::query::plumbing::::get_query
36: rustc::ty::context::tls::enter_global
36: rustc::ty::context::tls::enter_global
37: rustc_interface::passes::BoxedGlobalCtxt::access::{{closure}}
37: rustc_interface::passes::BoxedGlobalCtxt::access::{{closure}}
38: rustc_interface::passes::create_global_ctxt::{{closure}}
38: rustc_interface::passes::create_global_ctxt::{{closure}}
39: rustc_interface::interface::run_compiler_in_existing_thread_pool
39: rustc_interface::interface::run_compiler_in_existing_thread_pool
40: std::thread::local::LocalKey::with
40: std::thread::local::LocalKey::with
41: scoped_tls::ScopedKey::set
41: scoped_tls::ScopedKey::set
42: syntax::with_globals
42: syntax::with_globals
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.
query stack during panic:
query stack during panic:
#0 [borrowck] processing compiler::Compiler::compile_gene
#0 [borrowck] processing compiler::Compiler::compile_gene
#1 [mir_borrowck] processing compiler::Compiler::compile_gene
#1 [mir_borrowck] processing compiler::Compiler::compile_gene
#2 [analysis] running analysis passes on this crate
end of query stack
#2 [analysis] running analysis passes on this crate
end of query stack

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.37.0-nightly (0beb2ba 2019-07-02) running on x86_64-apple-darwin

note: compiler flags: -C debuginfo=2 -C incremental

note: some of the compiler flags provided by cargo are hidden

@jonas-schievink jonas-schievink added A-borrow-checker Area: The borrow checker 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. fixed-by-NLL Bugs fixed, but only when NLL is enabled. labels Aug 10, 2019
@jonas-schievink
Copy link
Contributor

It's in legacy borrowck, so tentatively marking as fixed-by-NLL

@matthewjasper
Copy link
Contributor

matthewjasper commented Aug 10, 2019

Can you test this on a newer nightly? It looks like the issue fixed by #62233

@jonas-schievink
Copy link
Contributor

Confirmed as fixed on nightly, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-borrow-checker Area: The borrow checker C-bug Category: This is a bug. fixed-by-NLL Bugs fixed, but only when NLL is enabled. 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

3 participants