You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I couldn't figure out how to reduce this (simple examples pass), but this occurs when running clippy on Portable SIMD (https://github.com/rust-lang/portable-simd, check out the feature/safety branch) after enabling this lint. I'm pretty sure it has something to do with macros.
Clippy version from master: clippy 0.1.58 (84a4ab7f3 2021-11-04)
Error output
thread 'rustc' panicked at 'assertion failed: self.start_pos.to_u32() + total_extra_bytes <= bpos.to_u32()', compiler/rustc_span/src/lib.rs:1682:9
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-clippy/issues/new
note: Clippy version: clippy 0.1.58 (84a4ab7f3 2021-11-04)
query stack during panic:
#0 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `core_simd`
Backtrace
thread 'rustc' panicked at 'assertion failed: self.start_pos.to_u32() + total_extra_bytes <= bpos.to_u32()', compiler/rustc_span/src/lib.rs:1682:9
stack backtrace:
0: rust_begin_unwind
at /rustc/baba6687df3e83fdb15cc6ec239b4a1c75a30505/library/std/src/panicking.rs:498:5
1: core::panicking::panic_fmt
at /rustc/baba6687df3e83fdb15cc6ec239b4a1c75a30505/library/core/src/panicking.rs:106:14
2: core::panicking::panic
at /rustc/baba6687df3e83fdb15cc6ec239b4a1c75a30505/library/core/src/panicking.rs:47:5
3: <rustc_span::SourceFile>::lookup_file_pos_with_col_display
4: clippy_lints::undocumented_unsafe_blocks::UndocumentedUnsafeBlocks::block_has_safety_comment
at /home/caleb/rust-clippy/clippy_lints/src/undocumented_unsafe_blocks.rs:173:48
5: <clippy_lints::undocumented_unsafe_blocks::UndocumentedUnsafeBlocks as rustc_lint::passes::LateLintPass>::check_block
at /home/caleb/rust-clippy/clippy_lints/src/undocumented_unsafe_blocks.rs:70:16
6: <rustc_lint::late::LateLintPassObjects as rustc_lint::passes::LateLintPass>::check_block
7: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_block
8: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_expr
9: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_block
10: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_expr
11: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_nested_body
12: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_fn
13: rustc_hir::intravisit::walk_impl_item::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
14: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_nested_impl_item
15: rustc_hir::intravisit::walk_impl_item_ref::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
16: rustc_hir::intravisit::walk_item::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
17: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_nested_item
18: rustc_hir::intravisit::walk_mod::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
19: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_mod
20: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_nested_item
21: rustc_hir::intravisit::walk_mod::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
22: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_mod
23: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_nested_item
24: rustc_hir::intravisit::walk_mod::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
25: <rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects> as rustc_hir::intravisit::Visitor>::visit_mod
26: <rustc_middle::hir::map::Map>::walk_toplevel_module::<rustc_lint::late::LateContextAndPass<rustc_lint::late::LateLintPassObjects>>
27: rustc_lint::late::late_lint_pass_crate::<rustc_lint::late::LateLintPassObjects>
28: <rustc_session::session::Session>::time::<(), rustc_lint::late::check_crate<rustc_lint::BuiltinCombinedLateLintPass, rustc_interface::passes::analysis::{closure#5}::{closure#0}::{closure#3}::{closure#0}::{closure#0}>::{closure#0}::{closure#0}>
29: <rustc_session::session::Session>::time::<(), rustc_interface::passes::analysis::{closure#5}::{closure#0}::{closure#3}::{closure#0}>
30: <core::panic::unwind_safe::AssertUnwindSafe<rustc_interface::passes::analysis::{closure#5}::{closure#0}> as core::ops::function::FnOnce<()>>::call_once
31: <rustc_session::session::Session>::time::<(), rustc_interface::passes::analysis::{closure#5}>
32: rustc_interface::passes::analysis
33: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, (), core::result::Result<(), rustc_errors::ErrorReported>>
34: rustc_data_structures::stack::ensure_sufficient_stack::<(core::result::Result<(), rustc_errors::ErrorReported>, rustc_query_system::dep_graph::graph::DepNodeIndex), rustc_query_system::query::plumbing::execute_job<rustc_query_impl::plumbing::QueryCtxt, (), core::result::Result<(), rustc_errors::ErrorReported>>::{closure#3}>
35: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<(), core::result::Result<(), rustc_errors::ErrorReported>>>
36: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::analysis, rustc_query_impl::plumbing::QueryCtxt>
37: <rustc_interface::passes::QueryContext>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}::{closure#3}, core::result::Result<(), rustc_errors::ErrorReported>>
38: <rustc_interface::interface::Compiler>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_errors::ErrorReported>>
39: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorReported>, rustc_interface::interface::create_compiler_and_run<core::result::Result<(), rustc_errors::ErrorReported>, rustc_driver::run_compiler::{closure#1}>::{closure#0}>
40: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::util::setup_callbacks_and_run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorReported>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorReported>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorReported>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose 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-clippy/issues/new
note: Clippy version: clippy 0.1.58 (84a4ab7f3 2021-11-04)
query stack during panic:
#0 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `core_simd` due to 232 previous errors
The text was updated successfully, but these errors were encountered:
calebzulawski
added
C-bug
Category: Clippy is not doing the correct thing
I-ICE
Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️
labels
Nov 5, 2021
I went to try out clippy::undocumented_unsafe_blocks which is newly stable in 1.58.0, and hit this ICE, whose fix didn't make it into 1.58.0 stable (going by the branch info GitHub shows).
I'm mentioning this in case anyone else met the problem and is looking for information, and in a small hope of prompting a backport so it can be used (though from this it sounds like only fixes for regressions are backported?)
Uh oh!
There was an error while loading. Please reload this page.
Code
I couldn't figure out how to reduce this (simple examples pass), but this occurs when running clippy on Portable SIMD (https://github.com/rust-lang/portable-simd, check out the
feature/safety
branch) after enabling this lint. I'm pretty sure it has something to do with macros.Meta
Rust version (
rustc -Vv
):Clippy version from master:
clippy 0.1.58 (84a4ab7f3 2021-11-04)
Error output
Backtrace
The text was updated successfully, but these errors were encountered: