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 in 1.49.0 nightly 2020-11-01 on windows #78660

Closed
CleanCut opened this issue Nov 2, 2020 · 5 comments · Fixed by #78663
Closed

ICE in 1.49.0 nightly 2020-11-01 on windows #78660

CleanCut opened this issue Nov 2, 2020 · 5 comments · Fixed by #78663
Assignees
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-medium Medium priority 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

@CleanCut
Copy link
Contributor

CleanCut commented Nov 2, 2020

Code

Simply building the rusty-xinput crate in the dependency chain seems to have triggered it. See https://github.com/bevyengine/bevy/pull/769/checks?check_run_id=1340257075

Meta

Rust version from the build

note: rustc 1.49.0-nightly (b20253260 2020-11-01) running on x86_64-pc-windows-msvc

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C debuginfo=0 --crate-type lib

Error output

thread 'rustc' panicked at 'explicit panic', compiler\rustc_middle\src\lint.rs:287:37
note: run with `RUST_BACKTRACE=1` environment variable to display 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/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.49.0-nightly (b20253260 2020-11-01) running on x86_64-pc-windows-msvc

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C debuginfo=0 --crate-type lib

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

query stack during panic:
#0 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `rusty-xinput`

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

I'm sorry - I don't have access to a windows environment to reproduce this!

@CleanCut CleanCut 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 2, 2020
@JohnTitor
Copy link
Member

I think #75534 is the cause, cc @Aaron1011.
Note that you should set RUSTFLAGS="-D warnings" to reproduce it. I don't feel this is Windows-specific but it just depends on the Windows-specific crate, marking E-needs-mcve.

Backtrace
thread 'rustc' panicked at 'explicit panic', compiler\rustc_middle\src\lint.rs:287:37
stack backtrace:
   0:     0x7ff863329e2e - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h34f33193f2c6e691
   1:     0x7ff863357e7b - core::fmt::write::h435be716304d26a1
   2:     0x7ff86331b788 - <std::io::IoSlice as core::fmt::Debug>::fmt::h5c209409e89b6b83
   3:     0x7ff86332f36d - std::panicking::take_hook::h78aad67ccc0974f2
   4:     0x7ff86332ef48 - std::panicking::take_hook::h78aad67ccc0974f2
   5:     0x7ff8480a19b7 - rustc_driver::report_ice::hef358031e18df712
   6:     0x7ff86332fe80 - std::panicking::rust_panic_with_hook::h4d71ff73fb7c451d
   7:     0x7ff84c5ac074 - rustc_middle::ty::structural_impls::<impl rustc_middle::ty::context::Lift for rustc_ast::ast::InlineAsmOptions>::lift_to_tcx::h042fb894ab77ec23
   8:     0x7ff84c5abf6f - rustc_middle::ty::structural_impls::<impl rustc_middle::ty::context::Lift for rustc_ast::ast::InlineAsmOptions>::lift_to_tcx::h042fb894ab77ec23
   9:     0x7ff84c5abfad - rustc_middle::ty::structural_impls::<impl rustc_middle::ty::context::Lift for rustc_ast::ast::InlineAsmOptions>::lift_to_tcx::h042fb894ab77ec23
  10:     0x7ff84c5c6d01 - rustc_middle::lint::struct_lint_level::struct_lint_level_impl::h8ed4092b7d535841
  11:     0x7ff84bcec813 - <rustc_lint::array_into_iter::ArrayIntoIter as rustc_lint::passes::LateLintPass>::check_expr::h876461b2d5357325
  12:     0x7ff84bcacc05 - <rustc_lint::BuiltinCombinedLateLintPass as rustc_lint::passes::LateLintPass>::check_expr::hdeaf5fd3da5c9014
  13:     0x7ff84827d272 - <rustc_interface::proc_macro_decls::Finder as rustc_hir::itemlikevisit::ItemLikeVisitor>::visit_item::h95eaafd33dc1f3b3
  14:     0x7ff84821224f - <rustc_interface::proc_macro_decls::Finder as rustc_hir::itemlikevisit::ItemLikeVisitor>::visit_item::h95eaafd33dc1f3b3
  15:     0x7ff84827d27d - <rustc_interface::proc_macro_decls::Finder as rustc_hir::itemlikevisit::ItemLikeVisitor>::visit_item::h95eaafd33dc1f3b3
  16:     0x7ff84821240e - <rustc_interface::proc_macro_decls::Finder as rustc_hir::itemlikevisit::ItemLikeVisitor>::visit_item::h95eaafd33dc1f3b3
  17:     0x7ff84827d27d - <rustc_interface::proc_macro_decls::Finder as rustc_hir::itemlikevisit::ItemLikeVisitor>::visit_item::h95eaafd33dc1f3b3
  18:     0x7ff84827d27d - <rustc_interface::proc_macro_decls::Finder as rustc_hir::itemlikevisit::ItemLikeVisitor>::visit_item::h95eaafd33dc1f3b3
  19:     0x7ff84827d372 - <rustc_interface::proc_macro_decls::Finder as rustc_hir::itemlikevisit::ItemLikeVisitor>::visit_item::h95eaafd33dc1f3b3
  20:     0x7ff84821252c - <rustc_interface::proc_macro_decls::Finder as rustc_hir::itemlikevisit::ItemLikeVisitor>::visit_item::h95eaafd33dc1f3b3
  21:     0x7ff84827d27d - <rustc_interface::proc_macro_decls::Finder as rustc_hir::itemlikevisit::ItemLikeVisitor>::visit_item::h95eaafd33dc1f3b3
  22:     0x7ff84827d6e3 - <rustc_interface::proc_macro_decls::Finder as rustc_hir::itemlikevisit::ItemLikeVisitor>::visit_item::h95eaafd33dc1f3b3
  23:     0x7ff84827db47 - <rustc_interface::proc_macro_decls::Finder as rustc_hir::itemlikevisit::ItemLikeVisitor>::visit_item::h95eaafd33dc1f3b3
  24:     0x7ff84820efa8 - <rustc_interface::proc_macro_decls::Finder as rustc_hir::itemlikevisit::ItemLikeVisitor>::visit_item::h95eaafd33dc1f3b3
  25:     0x7ff8482809a3 - <rustc_interface::proc_macro_decls::Finder as rustc_hir::itemlikevisit::ItemLikeVisitor>::visit_item::h95eaafd33dc1f3b3
  26:     0x7ff84821354b - <rustc_interface::proc_macro_decls::Finder as rustc_hir::itemlikevisit::ItemLikeVisitor>::visit_item::h95eaafd33dc1f3b3
  27:     0x7ff8482803c3 - <rustc_interface::proc_macro_decls::Finder as rustc_hir::itemlikevisit::ItemLikeVisitor>::visit_item::h95eaafd33dc1f3b3
  28:     0x7ff84820e36e - <rustc_interface::proc_macro_decls::Finder as rustc_hir::itemlikevisit::ItemLikeVisitor>::visit_item::h95eaafd33dc1f3b3
  29:     0x7ff84827368d - <rustc_interface::proc_macro_decls::Finder as rustc_hir::itemlikevisit::ItemLikeVisitor>::visit_item::h95eaafd33dc1f3b3
  30:     0x7ff848296921 - <rustc_interface::proc_macro_decls::Finder as rustc_hir::itemlikevisit::ItemLikeVisitor>::visit_item::h95eaafd33dc1f3b3
  31:     0x7ff8482bd8ae - rustc_interface::passes::QueryContext::print_stats::h960d22dc06b880d2
  32:     0x7ff8480e2d00 - rustc_ast::util::parser::prec_let_scrutinee_needs_par::h3e367fa31fb5b7e3
  33:     0x7ff8480a52c7 - <rustc_driver::Compilation as core::fmt::Debug>::fmt::ha64461c03fe53d77
  34:     0x7ff8480bd5b6 - rustc_ast::util::parser::prec_let_scrutinee_needs_par::h3e367fa31fb5b7e3
  35:     0x7ff848059e73 - <rustc_span::symbol::SymbolStr as core::fmt::Display>::fmt::hee7667dfc0b493b5
  36:     0x7ff8480e80db - rustc_ast::util::parser::prec_let_scrutinee_needs_par::h3e367fa31fb5b7e3
  37:     0x7ff8480c0d16 - rustc_ast::util::parser::prec_let_scrutinee_needs_par::h3e367fa31fb5b7e3
  38:     0x7ff8480eb9dd - rustc_ast::util::parser::prec_let_scrutinee_needs_par::h3e367fa31fb5b7e3
  39:     0x7ff86333ffb7 - std::sys::windows::thread::Thread::new::h4a8ee57959003089
  40:     0x7ff8c6267c24 - BaseThreadInitThunk
  41:     0x7ff8c69acea1 - RtlUserThreadStart

error: internal compiler error: unexpected panic

@JohnTitor JohnTitor added A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. labels Nov 2, 2020
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Nov 2, 2020
@Aaron1011 Aaron1011 self-assigned this Nov 2, 2020
@Aaron1011
Copy link
Member

MCVE: run rustc -D warnings --cap-lints allow bug.rs on:

// bug.rs
fn main() {
    ["hi"].into_iter();
}

@JohnTitor JohnTitor removed the E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example label Nov 2, 2020
@JohnTitor
Copy link
Member

JohnTitor commented Nov 2, 2020

Assigning P-medium as discussed as part of the Prioritization Working Group procedure and removing I-prioritize.

@JohnTitor JohnTitor added P-medium Medium priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Nov 2, 2020
@asomers
Copy link
Contributor

asomers commented Nov 3, 2020

I got the same error on Linux while compiling lazy_static. https://cirrus-ci.com/task/6280736288276480 .

@Aaron1011
Copy link
Member

This will be fixed by #78663

asomers added a commit to asomers/mockall that referenced this issue Nov 3, 2020
Temporarily downgrade rustc nightly during CI minver to workaround a
Rustc bug.
rust-lang/rust#78660
asomers added a commit to asomers/mockall that referenced this issue Nov 3, 2020
Temporarily downgrade rustc nightly during CI minver to workaround a
Rustc bug.
rust-lang/rust#78660
asomers added a commit to asomers/mockall that referenced this issue Nov 3, 2020
Temporarily downgrade rustc nightly during CI minver to workaround a
Rustc bug.
rust-lang/rust#78660
JohnTitor added a commit to JohnTitor/rust that referenced this issue Nov 3, 2020
…tmandry

Fix ICE when a future-incompat-report has its command-line level capped

Fixes rust-lang#78660

With PR rust-lang#75534 merged, we now run
more lint-related code for future-incompat-report, even when their final
level is Allow. Some lint-related code was not expecting `Level::Allow`,
and had an explicit panic.

This PR explicitly tracks the lint level set on the command line before
`--cap-lints` is applied. This is used to emit a more precise error
note (e.g. we don't say that `-W lint-name` was specified on the
command line just because a lint was capped to Warn). As a result, we
can now correctly emit a note that `-A` was used if we got
`Level::Allow` from the command line (before the cap is applied).
@bors bors closed this as completed in 6c1f15f Nov 3, 2020
asomers added a commit to asomers/mockall that referenced this issue Nov 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-medium Medium priority 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

Successfully merging a pull request may close this issue.

5 participants