Skip to content

panic w/ clippy 0.1.63 (4b91a6ea 2022-08-08) #9358

Closed
@joshuef

Description

@joshuef

Running clipy against my Wip branch (excuse the mess! :P ): here's the specific commit

This is on my m1 air. Let me know if more details are needed!

(And thanks for all the clippy work so far! 🙇 )

    Checking sn_cli v0.60.0 (/Users/josh/Projects/sn/sn_cli)
thread 'rustc' panicked at 'attempted to read from stolen value: rustc_middle::mir::Body', compiler/rustc_mir_transform/src/check_unsafety.rs:517:36
stack backtrace:
   0:        0x101d3bfe0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h188b7ef1c7993e78
   1:        0x101d8da54 - core::fmt::write::he84a3004e7af3f34
   2:        0x101d2f0c0 - std::io::Write::write_fmt::h9370b50affaab0be
   3:        0x101d3ec24 - std::panicking::default_hook::{{closure}}::hc074f8023cce83ca
   4:        0x101d3e98c - std::panicking::default_hook::hef854b51b9b79ff2
   5:        0x100c8d400 - clippy_driver[8db44a2b9e9d2669]::ICE_HOOK::{closure#0}::{closure#0}
   6:        0x101d3f1f8 - std::panicking::rust_panic_with_hook::h1e59e224d558a492
   7:        0x101d3f090 - std::panicking::begin_panic_handler::{{closure}}::he1a9d6ab32bfd8c6
   8:        0x101d3c4bc - std::sys_common::backtrace::__rust_end_short_backtrace::he9b94791b02f48cd
   9:        0x101d3ede8 - _rust_begin_unwind
  10:        0x101dbb968 - core::panicking::panic_fmt::h9fec86f6a9c4146e
  11:        0x10b3ad09c - <rustc_data_structures[d06618763e7f5cde]::steal::Steal<rustc_middle[4fa9dd76776bb2aa]::mir::Body>>::borrow
  12:        0x10b441618 - rustc_mir_transform[3d5b9cf55a33f4c9]::check_unsafety::unsafety_check_result
  13:        0x10b43d8e4 - <rustc_mir_transform[3d5b9cf55a33f4c9]::check_unsafety::provide::{closure#0} as core[bae5e8ef542d20e5]::ops::function::FnOnce<(rustc_middle[4fa9dd76776bb2aa]::ty::context::TyCtxt, rustc_span[143ffa354e326ede]::def_id::LocalDefId)>>::call_once
  14:        0x10bfccdf4 - rustc_query_system[f18d9eae22d44560]::query::plumbing::try_load_from_disk_and_cache_in_memory::<rustc_query_impl[d9716e6ec5023784]::plumbing::QueryCtxt, rustc_span[143ffa354e326ede]::def_id::LocalDefId, &rustc_middle[4fa9dd76776bb2aa]::mir::query::UnsafetyCheckResult>
  15:        0x10bf67960 - rustc_query_system[f18d9eae22d44560]::query::plumbing::try_execute_query::<rustc_query_impl[d9716e6ec5023784]::plumbing::QueryCtxt, rustc_query_system[f18d9eae22d44560]::query::caches::DefaultCache<rustc_span[143ffa354e326ede]::def_id::LocalDefId, &rustc_middle[4fa9dd76776bb2aa]::mir::query::UnsafetyCheckResult>>
  16:        0x10c015a8c - rustc_query_system[f18d9eae22d44560]::query::plumbing::get_query::<rustc_query_impl[d9716e6ec5023784]::queries::unsafety_check_result, rustc_query_impl[d9716e6ec5023784]::plumbing::QueryCtxt>
  17:        0x10b441ffc - rustc_mir_transform[3d5b9cf55a33f4c9]::check_unsafety::check_unsafety
  18:        0x109247258 - <rustc_session[282d64e95cd3bf88]::session::Session>::time::<(), rustc_interface[db32075e2a9c594e]::passes::analysis::{closure#3}>
  19:        0x109237f74 - rustc_interface[db32075e2a9c594e]::passes::analysis
  20:        0x10c1c7b48 - <rustc_query_system[f18d9eae22d44560]::dep_graph::graph::DepGraph<rustc_middle[4fa9dd76776bb2aa]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[4fa9dd76776bb2aa]::ty::context::TyCtxt, (), core[bae5e8ef542d20e5]::result::Result<(), rustc_errors[3321b68084f70bb0]::ErrorGuaranteed>>
  21:        0x10bf9c5d0 - rustc_query_system[f18d9eae22d44560]::query::plumbing::try_execute_query::<rustc_query_impl[d9716e6ec5023784]::plumbing::QueryCtxt, rustc_query_system[f18d9eae22d44560]::query::caches::DefaultCache<(), core[bae5e8ef542d20e5]::result::Result<(), rustc_errors[3321b68084f70bb0]::ErrorGuaranteed>>>
  22:        0x10c03b54c - rustc_query_system[f18d9eae22d44560]::query::plumbing::get_query::<rustc_query_impl[d9716e6ec5023784]::queries::analysis, rustc_query_impl[d9716e6ec5023784]::plumbing::QueryCtxt>
  23:        0x10916e66c - <rustc_interface[db32075e2a9c594e]::passes::QueryContext>::enter::<rustc_driver[8d2050f8429f7bc4]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[bae5e8ef542d20e5]::result::Result<(), rustc_errors[3321b68084f70bb0]::ErrorGuaranteed>>
  24:        0x1091517f0 - <rustc_interface[db32075e2a9c594e]::interface::Compiler>::enter::<rustc_driver[8d2050f8429f7bc4]::run_compiler::{closure#1}::{closure#2}, core[bae5e8ef542d20e5]::result::Result<core[bae5e8ef542d20e5]::option::Option<rustc_interface[db32075e2a9c594e]::queries::Linker>, rustc_errors[3321b68084f70bb0]::ErrorGuaranteed>>
  25:        0x10913dbb4 - rustc_span[143ffa354e326ede]::with_source_map::<core[bae5e8ef542d20e5]::result::Result<(), rustc_errors[3321b68084f70bb0]::ErrorGuaranteed>, rustc_interface[db32075e2a9c594e]::interface::create_compiler_and_run<core[bae5e8ef542d20e5]::result::Result<(), rustc_errors[3321b68084f70bb0]::ErrorGuaranteed>, rustc_driver[8d2050f8429f7bc4]::run_compiler::{closure#1}>::{closure#1}>
  26:        0x109151fe8 - <scoped_tls[e8c526b3ddc66487]::ScopedKey<rustc_span[143ffa354e326ede]::SessionGlobals>>::set::<rustc_interface[db32075e2a9c594e]::interface::run_compiler<core[bae5e8ef542d20e5]::result::Result<(), rustc_errors[3321b68084f70bb0]::ErrorGuaranteed>, rustc_driver[8d2050f8429f7bc4]::run_compiler::{closure#1}>::{closure#0}, core[bae5e8ef542d20e5]::result::Result<(), rustc_errors[3321b68084f70bb0]::ErrorGuaranteed>>
  27:        0x10919cb68 - std[ad4c17a2ddbcabe2]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[db32075e2a9c594e]::util::run_in_thread_pool_with_globals<rustc_interface[db32075e2a9c594e]::interface::run_compiler<core[bae5e8ef542d20e5]::result::Result<(), rustc_errors[3321b68084f70bb0]::ErrorGuaranteed>, rustc_driver[8d2050f8429f7bc4]::run_compiler::{closure#1}>::{closure#0}, core[bae5e8ef542d20e5]::result::Result<(), rustc_errors[3321b68084f70bb0]::ErrorGuaranteed>>::{closure#0}, core[bae5e8ef542d20e5]::result::Result<(), rustc_errors[3321b68084f70bb0]::ErrorGuaranteed>>
  28:        0x109170ef8 - <<std[ad4c17a2ddbcabe2]::thread::Builder>::spawn_unchecked_<rustc_interface[db32075e2a9c594e]::util::run_in_thread_pool_with_globals<rustc_interface[db32075e2a9c594e]::interface::run_compiler<core[bae5e8ef542d20e5]::result::Result<(), rustc_errors[3321b68084f70bb0]::ErrorGuaranteed>, rustc_driver[8d2050f8429f7bc4]::run_compiler::{closure#1}>::{closure#0}, core[bae5e8ef542d20e5]::result::Result<(), rustc_errors[3321b68084f70bb0]::ErrorGuaranteed>>::{closure#0}, core[bae5e8ef542d20e5]::result::Result<(), rustc_errors[3321b68084f70bb0]::ErrorGuaranteed>>::{closure#1} as core[bae5e8ef542d20e5]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  29:        0x101d47a5c - std::sys::unix::thread::Thread::new::thread_start::h7b2f9b83fb320a20
  30:        0x1915a826c - __pthread_deallocate

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.63 (4b91a6ea 2022-08-08)

query stack during panic:
#0 [unsafety_check_result] unsafety-checking `cli::run`
#1 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `sn_cli`

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thingI-ICEIssue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions