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

Clippy crash #11292

Closed
Nabushika opened this issue Aug 3, 2023 · 2 comments
Closed

Clippy crash #11292

Nabushika opened this issue Aug 3, 2023 · 2 comments

Comments

@Nabushika
Copy link

Crash running clippy in https://github.com/Nabushika/webex-rust/tree/b3d3e6d2dc9d16a28f64dcc608c2f243a73f95c6
command was cargo clippy --fix --allow-dirty (local repo has some unstaged files for local dev stuff)

Error report is as follows:

error: internal compiler error: no errors encountered even though `delay_span_bug` issued

error: internal compiler error: used a `TypeErrCtxt` without failing compilation
  |
  = note: delayed at    0: <rustc_errors::HandlerInner>::emit_diagnostic
             1: <rustc_errors::Handler>::delay_span_bug::<rustc_span::span_encoding::Span, &str>
             2: core::ptr::drop_in_place::<rustc_infer::infer::error_reporting::TypeErrCtxt>
             3: <clippy_utils::diagnostics::span_lint_and_then<rustc_lint::context::LateContext, rustc_span::span_encoding::Span, <clippy_lints::future_not_send::FutureNotSend as rustc_lint::
passes::LateLintPass>::check_fn::{closure#0}>::{closure#0} as core::ops::function::FnOnce<(&mut rustc_errors::diagnostic_builder::DiagnosticBuilder<()>,)>>::call_once::{shim:vtable#0}
             4: rustc_middle::lint::struct_lint_level::struct_lint_level_impl::<&str>
             5: rustc_middle::lint::struct_lint_level::<&str, clippy_utils::diagnostics::span_lint_and_then<rustc_lint::context::LateContext, rustc_span::span_encoding::Span, <clippy_lints::f
uture_not_send::FutureNotSend as rustc_lint::passes::LateLintPass>::check_fn::{closure#0}>::{closure#0}>
             6: <rustc_lint::context::LateContext as rustc_lint::context::LintContext>::struct_span_lint::<rustc_span::span_encoding::Span, &str, clippy_utils::diagnostics::span_lint_and_then
<rustc_lint::context::LateContext, rustc_span::span_encoding::Span, <clippy_lints::future_not_send::FutureNotSend as rustc_lint::passes::LateLintPass>::check_fn::{closure#0}>::{closure#0}>
             7: <clippy_lints::future_not_send::FutureNotSend as rustc_lint::passes::LateLintPass>::check_fn
             8: <rustc_lint::late::RuntimeCombinedLateLintPass as rustc_lint::passes::LateLintPass>::check_fn
             9: <rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass> as rustc_hir::intravisit::Visitor>::visit_fn
            10: rustc_hir::intravisit::walk_impl_item::<rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass>>
            11: <rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass> as rustc_hir::intravisit::Visitor>::visit_nested_impl_item
            12: rustc_hir::intravisit::walk_item::<rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass>>
            13: <rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass> as rustc_hir::intravisit::Visitor>::visit_nested_item
            14: rustc_hir::intravisit::walk_mod::<rustc_lint::late::LateContextAndPass<rustc_lint::late::RuntimeCombinedLateLintPass>>
            15: rustc_lint::late::late_lint_crate::<rustc_lint::BuiltinCombinedLateLintPass>
            16: <rustc_session::session::Session>::time::<(), rustc_lint::late::check_crate<rustc_lint::BuiltinCombinedLateLintPass, rustc_interface::passes::analysis::{closure#6}::{closure#1
}::{closure#2}::{closure#0}::{closure#0}>::{closure#0}::{closure#0}>
            17: <rustc_session::session::Session>::time::<(), rustc_interface::passes::analysis::{closure#6}::{closure#1}::{closure#2}::{closure#0}>
            18: <core::panic::unwind_safe::AssertUnwindSafe<rustc_interface::passes::analysis::{closure#6}::{closure#1}> as core::ops::function::FnOnce<()>>::call_once
            19: <rustc_session::session::Session>::time::<(), rustc_interface::passes::analysis::{closure#6}>
            20: rustc_interface::passes::analysis
            21: <std::thread::local::LocalKey<core::cell::Cell<*const ()>>>::with::<rustc_middle::ty::context::tls::enter_context<rustc_query_system::query::plumbing::execute_job_incr<rustc_q
uery_impl::queries::analysis, rustc_query_impl::plumbing::QueryCtxt>::{closure#2}, (rustc_middle::query::erase::Erased<[u8; 1]>, rustc_query_system::dep_graph::graph::DepNodeIndex)>::{closure
#0}, (rustc_middle::query::erase::Erased<[u8; 1]>, rustc_query_system::dep_graph::graph::DepNodeIndex)>
            22: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::queries::analysis, rustc_query_impl::plumbing::QueryCtxt>
            23: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
            24: <std::thread::local::LocalKey<core::cell::Cell<*const ()>>>::with::<rustc_middle::ty::context::tls::enter_context<<rustc_middle::ty::context::GlobalCtxt>::enter<rustc_driver_i
mpl::run_compiler::{closure#1}::{closure#2}::{closure#4}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure
#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
            25: <rustc_interface::interface::Compiler>::enter::<rustc_driver_impl::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::
Linker>, rustc_span::ErrorGuaranteed>>
            26: rustc_span::set_source_map::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuarante
ed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
            27: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result
<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::
Result<(), rustc_span::ErrorGuaranteed>>
            28: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::
ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_
span::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
            29: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                       at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/alloc/src/boxed.rs:1973:9
            30: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                       at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/alloc/src/boxed.rs:1973:9
            31: std::sys::unix::thread::Thread::new::thread_start
                       at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys/unix/thread.rs:108:17
            32: start_thread
                       at /build/glibc-S9d2JN/glibc-2.27/nptl/pthread_create.c:463
            33: __GI___clone
                       at /build/glibc-S9d2JN/glibc-2.27/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95


thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1679:13
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.70 (90c5418 2023-05-31)

query stack during panic:
end of query stack

Cargo version: cargo 1.70.0 (ec8a8a0ca 2023-04-25)
Rustc version: rustc 1.70.0 (90c541806 2023-05-31)

I've verified it works with a fresh clone of the repository at the commit specified.
cargo build works fine, cargo clippy also works fine. Feel free to reach out if you need any other information :)

@y21
Copy link
Member

y21 commented Aug 3, 2023

I just tried it locally with nightly rustc/clippy and it does not ICE for me, just a couple of warnings. Can you try updating and see if it still crashes with a newer clippy?

@Centri3
Copy link
Member

Centri3 commented Aug 3, 2023

Probably a duplicate of #10645, backtrace looks the same. This was fixed already I believe upstream, feel free to reopen if not!

@Centri3 Centri3 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants