Skip to content

Compiler error while compiling the k256 library #135539

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

Closed
BosonicJustin opened this issue Jan 15, 2025 · 4 comments
Closed

Compiler error while compiling the k256 library #135539

BosonicJustin opened this issue Jan 15, 2025 · 4 comments
Labels
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.

Comments

@BosonicJustin
Copy link

The compiler error is caused by the line self.0.sign_digest(Digest::new_with_prefix(digest_bytes)) and self.0.sign_digest(Digest::new()) (commented out in the provided code for testing).

Code

use k256::ecdsa::{Signature, SigningKey, signature::{DigestSigner, DigestVerifier}};
use sha3::{Digest, Keccak256};

struct SignatureECDSA(SigningKey);

impl SignatureECDSA {
    pub fn generate() -> Self {
        Self(SigningKey::random(&mut rand::thread_rng()))
    }

    pub fn new(signing_key: SigningKey) -> Self {
        Self(signing_key)
    }

    pub fn sign(&self, digest_bytes: &[u8; 32]) -> Signature {
        // self.0.sign_digest(Digest::new())

        self.0.sign_digest(Digest::new_with_prefix(digest_bytes))
    }
}

Meta

rustc --version --verbose:

rustc 1.84.0 (9fc6b4312 2025-01-07)
binary: rustc
commit-hash: 9fc6b43126469e3858e2fe86cafb4f0fd5068869
commit-date: 2025-01-07
host: aarch64-apple-darwin
release: 1.84.0
LLVM version: 19.1.5

Error output

thread 'rustc' panicked at compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs:1824:44:
called `Option::unwrap()` on a `None` value
stack backtrace:
   0:        0x10e8b50c8 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::hadba1856081fe8dc
   1:        0x10bae7760 - core::fmt::write::h5358bd20891469bc
   2:        0x10e8a9370 - std::io::Write::write_fmt::hbf0611cc5d72cc91
   3:        0x10e8b4f88 - std::sys::backtrace::BacktraceLock::print::he2302a8c253c9a13
   4:        0x10e8b7464 - std::panicking::default_hook::{{closure}}::hec1f77a77d7e7ffc
   5:        0x10e8b72ac - std::panicking::default_hook::hdd59ab537dd27efb
   6:        0x10c6f99a4 - <alloc[2c4d29f23d41489e]::boxed::Box<rustc_driver_impl[fde3e58afcc15f53]::install_ice_hook::{closure#0}> as core[9d7f355b91206121]::ops::function::Fn<(&dyn for<'a, 'b> core[9d7f355b91206121]::ops::function::Fn<(&'a std[73d933f036ca7723]::panic::PanicHookInfo<'b>,), Output = ()> + core[9d7f355b91206121]::marker::Sync + core[9d7f355b91206121]::marker::Send, &std[73d933f036ca7723]::panic::PanicHookInfo)>>::call
   7:        0x10e8b7d30 - std::panicking::rust_panic_with_hook::h533a16f5f89e4278
   8:        0x10e8b7944 - std::panicking::begin_panic_handler::{{closure}}::h168c3a4362c8e4df
   9:        0x10e8b5570 - std::sys::backtrace::__rust_end_short_backtrace::h601e3529ca2053df
  10:        0x10e8b7630 - _rust_begin_unwind
  11:        0x110f9a66c - core::panicking::panic_fmt::ha0f8363f677e0181
  12:        0x110f9a6dc - core::panicking::panic::hdb1c1abf01ff1978
  13:        0x110f9a604 - core::option::unwrap_failed::hb903c8fd63cd2e84
  14:        0x10e41966c - <rustc_trait_selection[89a651589df3a14e]::error_reporting::TypeErrCtxt>::report_similar_impl_candidates
  15:        0x10e43d8d8 - <rustc_trait_selection[89a651589df3a14e]::error_reporting::TypeErrCtxt>::report_fulfillment_errors
  16:        0x10cc7150c - <rustc_hir_typeck[986b14b3a50cff68]::fn_ctxt::FnCtxt>::report_ambiguity_errors
  17:        0x10ce2f990 - rustc_hir_typeck[986b14b3a50cff68]::typeck
  18:        0x10ddf1910 - rustc_query_impl[145af9e7c4635083]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[145af9e7c4635083]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[e034b0937dcee594]::query::erase::Erased<[u8; 8usize]>>
  19:        0x10de4ff1c - <rustc_query_impl[145af9e7c4635083]::query_impl::typeck::dynamic_query::{closure#2} as core[9d7f355b91206121]::ops::function::FnOnce<(rustc_middle[e034b0937dcee594]::ty::context::TyCtxt, rustc_span[23ddc3a9082bdf6f]::def_id::LocalDefId)>>::call_once
  20:        0x10dd94afc - rustc_query_system[2ae06c999199ab2d]::query::plumbing::try_execute_query::<rustc_query_impl[145af9e7c4635083]::DynamicConfig<rustc_data_structures[8a142a31ce6323d3]::vec_cache::VecCache<rustc_span[23ddc3a9082bdf6f]::def_id::LocalDefId, rustc_middle[e034b0937dcee594]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[2ae06c999199ab2d]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[145af9e7c4635083]::plumbing::QueryCtxt, true>
  21:        0x10df25d84 - rustc_query_impl[145af9e7c4635083]::query_impl::typeck::get_query_incr::__rust_end_short_backtrace
  22:        0x10ca14820 - <rustc_middle[e034b0937dcee594]::hir::map::Map>::par_body_owners::<rustc_hir_analysis[c404e5c07f76cdb8]::check_crate::{closure#4}>::{closure#0}
  23:        0x10c9fe2d0 - <rustc_data_structures[8a142a31ce6323d3]::sync::parallel::ParallelGuard>::run::<(), rustc_data_structures[8a142a31ce6323d3]::sync::parallel::par_for_each_in<&rustc_span[23ddc3a9082bdf6f]::def_id::LocalDefId, &[rustc_span[23ddc3a9082bdf6f]::def_id::LocalDefId], <rustc_middle[e034b0937dcee594]::hir::map::Map>::par_body_owners<rustc_hir_analysis[c404e5c07f76cdb8]::check_crate::{closure#4}>::{closure#0}>::{closure#0}::{closure#1}::{closure#0}>
  24:        0x10ca65d34 - rustc_hir_analysis[c404e5c07f76cdb8]::check_crate
  25:        0x10d090718 - rustc_interface[11fadb382dc0a35f]::passes::analysis
  26:        0x10ddf19b0 - rustc_query_impl[145af9e7c4635083]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[145af9e7c4635083]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[e034b0937dcee594]::query::erase::Erased<[u8; 1usize]>>
  27:        0x10de503c4 - <rustc_query_impl[145af9e7c4635083]::query_impl::analysis::dynamic_query::{closure#2} as core[9d7f355b91206121]::ops::function::FnOnce<(rustc_middle[e034b0937dcee594]::ty::context::TyCtxt, ())>>::call_once
  28:        0x10dd00068 - rustc_query_system[2ae06c999199ab2d]::query::plumbing::try_execute_query::<rustc_query_impl[145af9e7c4635083]::DynamicConfig<rustc_query_system[2ae06c999199ab2d]::query::caches::SingleCache<rustc_middle[e034b0937dcee594]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[145af9e7c4635083]::plumbing::QueryCtxt, true>
  29:        0x10df13d40 - rustc_query_impl[145af9e7c4635083]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
  30:        0x10c71bb08 - <rustc_middle[e034b0937dcee594]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[fde3e58afcc15f53]::run_compiler::{closure#0}::{closure#1}::{closure#6}, core[9d7f355b91206121]::result::Result<(), rustc_span[23ddc3a9082bdf6f]::ErrorGuaranteed>>
  31:        0x10c6b77f4 - <rustc_interface[11fadb382dc0a35f]::interface::Compiler>::enter::<rustc_driver_impl[fde3e58afcc15f53]::run_compiler::{closure#0}::{closure#1}, core[9d7f355b91206121]::result::Result<core[9d7f355b91206121]::option::Option<rustc_interface[11fadb382dc0a35f]::queries::Linker>, rustc_span[23ddc3a9082bdf6f]::ErrorGuaranteed>>
  32:        0x10c6eca24 - rustc_span[23ddc3a9082bdf6f]::create_session_globals_then::<core[9d7f355b91206121]::result::Result<(), rustc_span[23ddc3a9082bdf6f]::ErrorGuaranteed>, rustc_interface[11fadb382dc0a35f]::util::run_in_thread_with_globals<rustc_interface[11fadb382dc0a35f]::util::run_in_thread_pool_with_globals<rustc_interface[11fadb382dc0a35f]::interface::run_compiler<core[9d7f355b91206121]::result::Result<(), rustc_span[23ddc3a9082bdf6f]::ErrorGuaranteed>, rustc_driver_impl[fde3e58afcc15f53]::run_compiler::{closure#0}>::{closure#1}, core[9d7f355b91206121]::result::Result<(), rustc_span[23ddc3a9082bdf6f]::ErrorGuaranteed>>::{closure#0}, core[9d7f355b91206121]::result::Result<(), rustc_span[23ddc3a9082bdf6f]::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}>
  33:        0x10c6e1c50 - std[73d933f036ca7723]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[11fadb382dc0a35f]::util::run_in_thread_with_globals<rustc_interface[11fadb382dc0a35f]::util::run_in_thread_pool_with_globals<rustc_interface[11fadb382dc0a35f]::interface::run_compiler<core[9d7f355b91206121]::result::Result<(), rustc_span[23ddc3a9082bdf6f]::ErrorGuaranteed>, rustc_driver_impl[fde3e58afcc15f53]::run_compiler::{closure#0}>::{closure#1}, core[9d7f355b91206121]::result::Result<(), rustc_span[23ddc3a9082bdf6f]::ErrorGuaranteed>>::{closure#0}, core[9d7f355b91206121]::result::Result<(), rustc_span[23ddc3a9082bdf6f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[9d7f355b91206121]::result::Result<(), rustc_span[23ddc3a9082bdf6f]::ErrorGuaranteed>>
  34:        0x10c6e5050 - <<std[73d933f036ca7723]::thread::Builder>::spawn_unchecked_<rustc_interface[11fadb382dc0a35f]::util::run_in_thread_with_globals<rustc_interface[11fadb382dc0a35f]::util::run_in_thread_pool_with_globals<rustc_interface[11fadb382dc0a35f]::interface::run_compiler<core[9d7f355b91206121]::result::Result<(), rustc_span[23ddc3a9082bdf6f]::ErrorGuaranteed>, rustc_driver_impl[fde3e58afcc15f53]::run_compiler::{closure#0}>::{closure#1}, core[9d7f355b91206121]::result::Result<(), rustc_span[23ddc3a9082bdf6f]::ErrorGuaranteed>>::{closure#0}, core[9d7f355b91206121]::result::Result<(), rustc_span[23ddc3a9082bdf6f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[9d7f355b91206121]::result::Result<(), rustc_span[23ddc3a9082bdf6f]::ErrorGuaranteed>>::{closure#1} as core[9d7f355b91206121]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  35:        0x10e8c1df0 - std::sys::pal::unix::thread::Thread::new::thread_start::ha1530855ce6ee203
  36:        0x1970ac2e4 - __pthread_deallocate

error: 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.84.0 (9fc6b4312 2025-01-07) running on aarch64-apple-darwin

note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=unpacked -C incremental=[REDACTED]

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

query stack during panic:
#0 [typeck] type-checking `cryptography::ecdsa::<impl at core/src/cryptography/ecdsa.rs:6:1: 6:20>::sign`
#1 [analysis] running analysis passes on this crate
end of query stack
warning: `pod-core` (lib) generated 2 warnings (run `cargo fix --lib -p pod-core` to apply 2 suggestions)
error: could not compile `pod-core` (lib); 2 warnings emitted

Caused by:
  process didn't exit successfully: `/Users/justinaszaliaduonis/.rustup/toolchains/stable-aarch64-apple-darwin/bin/rustc --crate-name pod_core --edition=2021 core/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=176 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=unpacked --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values())' -C metadata=5dfa7fc097c045d7 -C extra-filename=-5dfa7fc097c045d7 --out-dir /Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps -C incremental=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/incremental -L dependency=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps --extern alloy_consensus=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/liballoy_consensus-575f2a9d311403a6.rmeta --extern alloy_network=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/liballoy_network-aed7f31b4108e763.rmeta --extern alloy_primitives=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/liballoy_primitives-da31089a68d4daa1.rmeta --extern alloy_rpc_types=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/liballoy_rpc_types-4bab661dd9076f22.rmeta --extern alloy_signer=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/liballoy_signer-ff3e5ef0d362441c.rmeta --extern alloy_signer_local=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/liballoy_signer_local-fd08fbd5b331cc96.rmeta --extern alloy_sol_types=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/liballoy_sol_types-676c006ac9658dd0.rmeta --extern anyhow=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libanyhow-d3b278b560b571e1.rmeta --extern async_trait=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libasync_trait-66317e4e1eeea339.dylib --extern backoff=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libbackoff-6ddb2a2229dc28fd.rmeta --extern bincode=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libbincode-4440fd910e2e7173.rmeta --extern bitvec=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libbitvec-be496b0820bccfde.rmeta --extern bls_signatures=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libbls_signatures-37a0cf3cfafa8253.rmeta --extern bytes=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libbytes-1c7495fed026ffe0.rmeta --extern colored=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libcolored-59cd1b7b79d6571a.rmeta --extern const_format=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libconst_format-1cd57abea4a99a5b.rmeta --extern ecdsa=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libecdsa-c69e5b95dc948354.rmeta --extern ssz=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libssz-422185e560af5475.rmeta --extern fern=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libfern-cf5b1308e4b3af0c.rmeta --extern futures=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libfutures-b3d9a5aeb30388c1.rmeta --extern hex=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libhex-fbd2faa49cb32b1e.rmeta --extern humantime=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libhumantime-509cc6eee85d09b1.rmeta --extern itertools=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libitertools-f870de18c4a1367b.rmeta --extern jsonrpc_core=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libjsonrpc_core-803238207c194eec.rmeta --extern jsonrpc_http_server=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libjsonrpc_http_server-543e3a3d1dfd60ed.rmeta --extern k256=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libk256-d361e2837e756c80.rmeta --extern log=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/liblog-772705a0b3e0ca9f.rmeta --extern rand=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/librand-ba188ab9ae3b1888.rmeta --extern rand_core=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/librand_core-d435e3cd28922f58.rmeta --extern rocksdb=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/librocksdb-4fcf09b511b9fad9.rmeta --extern serde=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libserde-1a42ab868aa043c4.rmeta --extern serde_hex=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libserde_hex-fba37cffb63ebba3.rmeta --extern serde_json=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libserde_json-ffc6474a53afc502.rmeta --extern sha3=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libsha3-052f69e42719b731.rmeta --extern subtle=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libsubtle-aab122e52ebab310.rmeta --extern sylow=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libsylow-5c9faa6001270801.rmeta --extern tokio=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libtokio-7121a589b609e181.rmeta --extern tokio_stream=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libtokio_stream-7ce4f25a2d11acc6.rmeta --extern tokio_util=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libtokio_util-7d4599cbd6e3d102.rmeta --extern toml=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libtoml-c9134db262540f71.rmeta -L native=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/build/librocksdb-sys-35b1810c411157e3/out -L native=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/build/librocksdb-sys-35b1810c411157e3/out -L native=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/build/bzip2-sys-bdc90ecee50f6211/out/lib -L native=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/build/libz-sys-cbe9e5a544ab1b8e/out/lib -L native=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/build/libz-sys-cbe9e5a544ab1b8e/out/lib -L native=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/build/lz4-sys-1fb1cd34b7227341/out -L native=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/build/zstd-sys-474b81cc591b6cf4/out` (exit status: 101)
Backtrace

thread 'rustc' panicked at compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs:1824:44:
called `Option::unwrap()` on a `None` value
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic
   3: core::option::unwrap_failed
   4: <rustc_trait_selection::error_reporting::TypeErrCtxt>::report_similar_impl_candidates
   5: <rustc_trait_selection::error_reporting::TypeErrCtxt>::report_fulfillment_errors
   6: <rustc_hir_typeck::fn_ctxt::FnCtxt>::report_ambiguity_errors
   7: rustc_hir_typeck::typeck
      [... omitted 2 frames ...]
   8: <rustc_middle::hir::map::Map>::par_body_owners::<rustc_hir_analysis::check_crate::{closure#4}>::{closure#0}
   9: <rustc_data_structures::sync::parallel::ParallelGuard>::run::<(), rustc_data_structures::sync::parallel::par_for_each_in<&rustc_span::def_id::LocalDefId, &[rustc_span::def_id::LocalDefId], <rustc_middle::hir::map::Map>::par_body_owners<rustc_hir_analysis::check_crate::{closure#4}>::{closure#0}>::{closure#0}::{closure#1}::{closure#0}>
  10: rustc_hir_analysis::check_crate
  11: rustc_interface::passes::analysis
      [... omitted 2 frames ...]
  12: <rustc_middle::ty::context::GlobalCtxt>::enter::<rustc_driver_impl::run_compiler::{closure#0}::{closure#1}::{closure#6}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
  13: <rustc_interface::interface::Compiler>::enter::<rustc_driver_impl::run_compiler::{closure#0}::{closure#1}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_span::ErrorGuaranteed>>
  14: rustc_span::create_session_globals_then::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_interface::util::run_in_thread_with_globals<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#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: 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.84.0 (9fc6b4312 2025-01-07) running on aarch64-apple-darwin

note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=unpacked -C incremental=[REDACTED]

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

query stack during panic:
#0 [typeck] type-checking `cryptography::ecdsa::<impl at core/src/cryptography/ecdsa.rs:6:1: 6:20>::sign`
#1 [analysis] running analysis passes on this crate
end of query stack
warning: `pod-core` (lib) generated 2 warnings (run `cargo fix --lib -p pod-core` to apply 2 suggestions)
error: could not compile `pod-core` (lib); 2 warnings emitted

Caused by:
  process didn't exit successfully: `/Users/justinaszaliaduonis/.rustup/toolchains/stable-aarch64-apple-darwin/bin/rustc --crate-name pod_core --edition=2021 core/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=176 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=unpacked --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values())' -C metadata=5dfa7fc097c045d7 -C extra-filename=-5dfa7fc097c045d7 --out-dir /Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps -C incremental=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/incremental -L dependency=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps --extern alloy_consensus=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/liballoy_consensus-575f2a9d311403a6.rmeta --extern alloy_network=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/liballoy_network-aed7f31b4108e763.rmeta --extern alloy_primitives=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/liballoy_primitives-da31089a68d4daa1.rmeta --extern alloy_rpc_types=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/liballoy_rpc_types-4bab661dd9076f22.rmeta --extern alloy_signer=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/liballoy_signer-ff3e5ef0d362441c.rmeta --extern alloy_signer_local=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/liballoy_signer_local-fd08fbd5b331cc96.rmeta --extern alloy_sol_types=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/liballoy_sol_types-676c006ac9658dd0.rmeta --extern anyhow=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libanyhow-d3b278b560b571e1.rmeta --extern async_trait=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libasync_trait-66317e4e1eeea339.dylib --extern backoff=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libbackoff-6ddb2a2229dc28fd.rmeta --extern bincode=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libbincode-4440fd910e2e7173.rmeta --extern bitvec=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libbitvec-be496b0820bccfde.rmeta --extern bls_signatures=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libbls_signatures-37a0cf3cfafa8253.rmeta --extern bytes=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libbytes-1c7495fed026ffe0.rmeta --extern colored=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libcolored-59cd1b7b79d6571a.rmeta --extern const_format=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libconst_format-1cd57abea4a99a5b.rmeta --extern ecdsa=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libecdsa-c69e5b95dc948354.rmeta --extern ssz=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libssz-422185e560af5475.rmeta --extern fern=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libfern-cf5b1308e4b3af0c.rmeta --extern futures=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libfutures-b3d9a5aeb30388c1.rmeta --extern hex=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libhex-fbd2faa49cb32b1e.rmeta --extern humantime=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libhumantime-509cc6eee85d09b1.rmeta --extern itertools=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libitertools-f870de18c4a1367b.rmeta --extern jsonrpc_core=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libjsonrpc_core-803238207c194eec.rmeta --extern jsonrpc_http_server=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libjsonrpc_http_server-543e3a3d1dfd60ed.rmeta --extern k256=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libk256-d361e2837e756c80.rmeta --extern log=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/liblog-772705a0b3e0ca9f.rmeta --extern rand=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/librand-ba188ab9ae3b1888.rmeta --extern rand_core=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/librand_core-d435e3cd28922f58.rmeta --extern rocksdb=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/librocksdb-4fcf09b511b9fad9.rmeta --extern serde=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libserde-1a42ab868aa043c4.rmeta --extern serde_hex=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libserde_hex-fba37cffb63ebba3.rmeta --extern serde_json=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libserde_json-ffc6474a53afc502.rmeta --extern sha3=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libsha3-052f69e42719b731.rmeta --extern subtle=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libsubtle-aab122e52ebab310.rmeta --extern sylow=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libsylow-5c9faa6001270801.rmeta --extern tokio=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libtokio-7121a589b609e181.rmeta --extern tokio_stream=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libtokio_stream-7ce4f25a2d11acc6.rmeta --extern tokio_util=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libtokio_util-7d4599cbd6e3d102.rmeta --extern toml=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/deps/libtoml-c9134db262540f71.rmeta -L native=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/build/librocksdb-sys-35b1810c411157e3/out -L native=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/build/librocksdb-sys-35b1810c411157e3/out -L native=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/build/bzip2-sys-bdc90ecee50f6211/out/lib -L native=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/build/libz-sys-cbe9e5a544ab1b8e/out/lib -L native=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/build/libz-sys-cbe9e5a544ab1b8e/out/lib -L native=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/build/lz4-sys-1fb1cd34b7227341/out -L native=/Users/justinaszaliaduonis/Desktop/POD/pod-core/target/debug/build/zstd-sys-474b81cc591b6cf4/out` (exit status: 101)

@BosonicJustin BosonicJustin 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 Jan 15, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 15, 2025
@clubby789
Copy link
Contributor

clubby789 commented Jan 15, 2025

I can't reproduce this; on both stable and nightly, I get the error

error[E0790]: cannot call associated function on trait without specifying the corresponding `impl` type
  --> src/lib.rs:17:28
   |
17 |         self.0.sign_digest(Digest::new_with_prefix(digest_bytes))
   |                ----------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot call associated function of trait
   |                |
   |                required by a bound introduced by this call
   |

Can you check if you still get this issue after a cargo clean, and specify any crates + features used?

@jieyouxu
Copy link
Member

I believe this is a duplicate of #135410

@jieyouxu
Copy link
Member

jieyouxu commented Feb 4, 2025

Hi @BosonicJustin, could you check if this repros against 1.84.1?

@jieyouxu
Copy link
Member

jieyouxu commented Feb 8, 2025

I believe this is a duplicate of #135410 whose fix should have been backported to stable 1.84.1. I'm going to close this, but please re-open if this is still a problem.

@jieyouxu jieyouxu closed this as completed Feb 8, 2025
@jieyouxu jieyouxu removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

No branches or pull requests

4 participants