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

compiling scallop on haiku results in a possible compiler error #138847

Open
hoanga opened this issue Mar 23, 2025 · 1 comment
Open

compiling scallop on haiku results in a possible compiler error #138847

hoanga opened this issue Mar 23, 2025 · 1 comment
Labels
A-incr-comp Area: Incremental compilation 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

@hoanga
Copy link

hoanga commented Mar 23, 2025

I am not sure that this is a bug in the rust compiler as I am compiling on a non-conventional platform (Haiku) but reporting it here per the error messages suggesting to report it as a bug.

Code

> uname -a
Haiku shredder 1 hrev58760 Mar 19 2025 06:02:19 x86_64 x86_64 Haiku

> git clone  https://github.com/scallop-lang/scallop

> cd scallop

> cargo build

Meta

rustc --version --verbose:

> rustc --version --verbose
rustc 1.83.0 (90b35a623 2024-11-26)
binary: rustc
commit-hash: 90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf
commit-date: 2024-11-26
host: x86_64-unknown-haiku
release: 1.83.0
LLVM version: 19.1.1

Error output

~/src/git/rust-libs/scallop> cargo build
   Compiling scallop-core v0.2.5 (/boot/home/src/git/rust-libs/scallop/core)
   Compiling structopt-derive v0.4.18
   Compiling terminfo v0.8.0
   Compiling dirs-sys v0.3.7
thread 'rustc' panicked at /build/rust/compiler/rustc_serialize/src/serialize.rs:123:9:
assertion failed: bytes[len] == STR_SENTINEL
stack backtrace:
   0:       0x4c829cd7b6 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h211e794a362f40dd
   1:       0x4c82a092a3 - core::fmt::write::h679a90613660064a
   2:       0x4c829c588f - std::io::Write::write_fmt::hb7131611d7e169f6
   3:       0x4c829ce2e7 - std::panicking::default_hook::{{closure}}::h0e6445279946f7dc
   4:       0x4c829ce0ea - std::panicking::default_hook::he437807768caab6f
   5:       0x4c7cb53798 - <alloc[a039d7f8060c3ce2]::boxed::Box<rustc_driver_impl[8e64d6185ae46551]::install_ice_hook::{closure#0}> as core[ef89fd269bb1fde3]::ops::function::Fn<(&dyn for<'a, 'b> core[ef89fd269bb1fde3]::ops::function::Fn<(&'a std[9b903c7c25c6c255]::panic::PanicHookInfo<'b>,), Output = ()> + core[ef89fd269bb1fde3]::marker::Sync + core[ef89fd269bb1fde3]::marker::Send, &std[9b903c7c25c6c255]::panic::PanicHookInfo)>>::call
   6:       0x4c829ce9b3 - std::panicking::rust_panic_with_hook::h7f3a9e7423ce019d
   7:       0x4c829ce6c6 - std::panicking::begin_panic_handler::{{closure}}::hf4c0021b86b8a85a
   8:       0x4c829cd9b9 - std::sys::backtrace::__rust_end_short_backtrace::he1e2e7606d8ccf38
   9:       0x4c829ce38c - rust_begin_unwind
  10:       0x4c7c9f06d0 - core::panicking::panic_fmt::h189729c72e01e184
  11:       0x4c7c9f075c - core::panicking::panic::h33510552a2704143
  12:       0x4c81c564d4 - <rustc_metadata[7ca7ea15759dddc6]::rmeta::decoder::DecodeContext as rustc_span[7d624e693cabf70b]::SpanDecoder>::decode_symbol
  13:       0x4c81bde9f8 - <rustc_middle[2925b2bddd6380f6]::ty::VariantDef as rustc_serialize[facc1fd91ebcc2dd]::serialize::Decodable<rustc_metadata[7ca7ea15759dddc6]::rmeta::decoder::DecodeContext>>::decode
  14:       0x4c81ce9e1b - <alloc[a039d7f8060c3ce2]::vec::Vec<rustc_middle[2925b2bddd6380f6]::ty::VariantDef> as rustc_serialize[facc1fd91ebcc2dd]::serialize::Decodable<rustc_metadata[7ca7ea15759dddc6]::rmeta::decoder::DecodeContext>>::decode
  15:       0x4c81caa5bc - <rustc_type_ir[a1fec086c83ee950]::ty_kind::TyKind<rustc_middle[2925b2bddd6380f6]::ty::context::TyCtxt> as rustc_serialize[facc1fd91ebcc2dd]::serialize::Decodable<rustc_metadata[7ca7ea15759dddc6]::rmeta::decoder::DecodeContext>>::decode
  16:       0x4c81be4450 - <rustc_middle[2925b2bddd6380f6]::ty::Ty as rustc_serialize[facc1fd91ebcc2dd]::serialize::Decodable<rustc_metadata[7ca7ea15759dddc6]::rmeta::decoder::DecodeContext>>::decode
  17:       0x4c81c54872 - <rustc_metadata[7ca7ea15759dddc6]::rmeta::decoder::DecodeContext as rustc_type_ir[a1fec086c83ee950]::codec::TyDecoder>::cached_ty_for_shorthand::<<rustc_middle[2925b2bddd6380f6]::ty::Ty as rustc_serialize[facc1fd91ebcc2dd]::serialize::Decodable<rustc_metadata[7ca7ea15759dddc6]::rmeta::decoder::DecodeContext>>::decode::{closure#0}>
  18:       0x4c81be44e3 - <rustc_middle[2925b2bddd6380f6]::ty::Ty as rustc_serialize[facc1fd91ebcc2dd]::serialize::Decodable<rustc_metadata[7ca7ea15759dddc6]::rmeta::decoder::DecodeContext>>::decode
  19:       0x4c81bc6f02 - <rustc_type_ir[a1fec086c83ee950]::generic_arg::GenericArgKind<rustc_middle[2925b2bddd6380f6]::ty::context::TyCtxt> as rustc_serialize[facc1fd91ebcc2dd]::serialize::Decodable<rustc_metadata[7ca7ea15759dddc6]::rmeta::decoder::DecodeContext>>::decode
  20:       0x4c81bb8bc9 - <rustc_middle[2925b2bddd6380f6]::ty::generic_args::GenericArg as rustc_type_ir[a1fec086c83ee950]::interner::CollectAndApply<rustc_middle[2925b2bddd6380f6]::ty::generic_args::GenericArg, &rustc_middle[2925b2bddd6380f6]::ty::list::RawList<(), rustc_middle[2925b2bddd6380f6]::ty::generic_args::GenericArg>>>::collect_and_apply::<core[ef89fd269bb1fde3]::iter::adapters::map::Map<core[ef89fd269bb1fde3]::ops::range::Range<usize>, <&rustc_middle[2925b2bddd6380f6]::ty::list::RawList<(), rustc_middle[2925b2bddd6380f6]::ty::generic_args::GenericArg> as rustc_serialize[facc1fd91ebcc2dd]::serialize::Decodable<rustc_metadata[7ca7ea15759dddc6]::rmeta::decoder::DecodeContext>>::decode::{closure#0}>, <rustc_middle[2925b2bddd6380f6]::ty::context::TyCtxt>::mk_args_from_iter<core[ef89fd269bb1fde3]::iter::adapters::map::Map<core[ef89fd269bb1fde3]::ops::range::Range<usize>, <&rustc_middle[2925b2bddd6380f6]::ty::list::RawList<(), rustc_middle[2925b2bddd6380f6]::ty::generic_args::GenericArg> as rustc_serialize[facc1fd91ebcc2dd]::serialize::Decodable<rustc_metadata[7ca7ea15759dddc6]::rmeta::decoder::DecodeContext>>::decode::{closure#0}>, rustc_middle[2925b2bddd6380f6]::ty::generic_args::GenericArg>::{closure#0}>
  21:       0x4c81be9d89 - <&rustc_middle[2925b2bddd6380f6]::ty::list::RawList<(), rustc_middle[2925b2bddd6380f6]::ty::generic_args::GenericArg> as rustc_serialize[facc1fd91ebcc2dd]::serialize::Decodable<rustc_metadata[7ca7ea15759dddc6]::rmeta::decoder::DecodeContext>>::decode
  22:       0x4c81bc2ffb - <(rustc_middle[2925b2bddd6380f6]::middle::exported_symbols::ExportedSymbol, rustc_middle[2925b2bddd6380f6]::middle::exported_symbols::SymbolExportInfo) as rustc_serialize[facc1fd91ebcc2dd]::serialize::Decodable<rustc_metadata[7ca7ea15759dddc6]::rmeta::decoder::DecodeContext>>::decode
  23:       0x4c81c21c66 - <rustc_metadata[7ca7ea15759dddc6]::creader::CrateMetadataRef>::exported_symbols
  24:       0x4c81c109b0 - rustc_metadata[7ca7ea15759dddc6]::rmeta::decoder::cstore_impl::provide_extern::exported_symbols
  25:       0x4c8108b56b - rustc_query_impl[4cb07e87e9e7fe4a]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[4cb07e87e9e7fe4a]::query_impl::exported_symbols::dynamic_query::{closure#2}::{closure#0}, rustc_middle[2925b2bddd6380f6]::query::erase::Erased<[u8; 16usize]>>
  26:       0x4c810da5d0 - <rustc_query_impl[4cb07e87e9e7fe4a]::query_impl::exported_symbols::dynamic_query::{closure#2} as core[ef89fd269bb1fde3]::ops::function::FnOnce<(rustc_middle[2925b2bddd6380f6]::ty::context::TyCtxt, rustc_span[7d624e693cabf70b]::def_id::CrateNum)>>::call_once
  27:       0x4c81347e9c - <rustc_query_system[a67ba8233163ff09]::query::plumbing::execute_job_incr<rustc_query_impl[4cb07e87e9e7fe4a]::DynamicConfig<rustc_query_system[a67ba8233163ff09]::query::caches::VecCache<rustc_span[7d624e693cabf70b]::def_id::LocalDefId, rustc_middle[2925b2bddd6380f6]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[4cb07e87e9e7fe4a]::plumbing::QueryCtxt>::{closure#2}::{closure#2} as core[ef89fd269bb1fde3]::ops::function::FnOnce<((rustc_query_impl[4cb07e87e9e7fe4a]::plumbing::QueryCtxt, rustc_query_impl[4cb07e87e9e7fe4a]::DynamicConfig<rustc_query_system[a67ba8233163ff09]::query::caches::VecCache<rustc_span[7d624e693cabf70b]::def_id::LocalDefId, rustc_middle[2925b2bddd6380f6]::query::erase::Erased<[u8; 16usize]>>, false, false, false>), rustc_span[7d624e693cabf70b]::def_id::LocalDefId)>>::call_once
  28:       0x4c81143200 - <rustc_middle[2925b2bddd6380f6]::dep_graph::DepsType as rustc_query_system[a67ba8233163ff09]::dep_graph::Deps>::with_deps::<<rustc_query_system[a67ba8233163ff09]::dep_graph::graph::DepGraphData<rustc_middle[2925b2bddd6380f6]::dep_graph::DepsType>>::with_task<(rustc_query_impl[4cb07e87e9e7fe4a]::plumbing::QueryCtxt, rustc_query_impl[4cb07e87e9e7fe4a]::DynamicConfig<rustc_query_system[a67ba8233163ff09]::query::caches::VecCache<rustc_span[7d624e693cabf70b]::def_id::CrateNum, rustc_middle[2925b2bddd6380f6]::query::erase::Erased<[u8; 16usize]>>, false, false, false>), rustc_span[7d624e693cabf70b]::def_id::CrateNum, rustc_middle[2925b2bddd6380f6]::query::erase::Erased<[u8; 16usize]>>::{closure#0}::{closure#0}, rustc_middle[2925b2bddd6380f6]::query::erase::Erased<[u8; 16usize]>>
  29:       0x4c8133eedb - rustc_query_system[a67ba8233163ff09]::query::plumbing::try_execute_query::<rustc_query_impl[4cb07e87e9e7fe4a]::DynamicConfig<rustc_query_system[a67ba8233163ff09]::query::caches::VecCache<rustc_span[7d624e693cabf70b]::def_id::CrateNum, rustc_middle[2925b2bddd6380f6]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[4cb07e87e9e7fe4a]::plumbing::QueryCtxt, true>
  30:       0x4c8118a194 - rustc_query_impl[4cb07e87e9e7fe4a]::query_impl::exported_symbols::get_query_incr::__rust_end_short_backtrace
  31:       0x4c815cd020 - rustc_codegen_ssa[b1c1b7eb7f026b0]::back::symbol_export::upstream_monomorphizations_provider
  32:       0x4c8108ef5d - rustc_query_impl[4cb07e87e9e7fe4a]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[4cb07e87e9e7fe4a]::query_impl::upstream_monomorphizations::dynamic_query::{closure#2}::{closure#0}, rustc_middle[2925b2bddd6380f6]::query::erase::Erased<[u8; 8usize]>>
  33:       0x4c810eba18 - <rustc_query_impl[4cb07e87e9e7fe4a]::query_impl::upstream_monomorphizations::dynamic_query::{closure#2} as core[ef89fd269bb1fde3]::ops::function::FnOnce<(rustc_middle[2925b2bddd6380f6]::ty::context::TyCtxt, ())>>::call_once
  34:       0x4c811407b8 - <rustc_middle[2925b2bddd6380f6]::dep_graph::DepsType as rustc_query_system[a67ba8233163ff09]::dep_graph::Deps>::with_deps::<<rustc_query_system[a67ba8233163ff09]::dep_graph::graph::DepGraphData<rustc_middle[2925b2bddd6380f6]::dep_graph::DepsType>>::with_task<(rustc_query_impl[4cb07e87e9e7fe4a]::plumbing::QueryCtxt, rustc_query_impl[4cb07e87e9e7fe4a]::DynamicConfig<rustc_query_system[a67ba8233163ff09]::query::caches::SingleCache<rustc_middle[2925b2bddd6380f6]::query::erase::Erased<[u8; 8usize]>>, false, false, false>), (), rustc_middle[2925b2bddd6380f6]::query::erase::Erased<[u8; 8usize]>>::{closure#0}::{closure#0}, rustc_middle[2925b2bddd6380f6]::query::erase::Erased<[u8; 8usize]>>
  35:       0x4c812eb568 - rustc_query_system[a67ba8233163ff09]::query::plumbing::try_execute_query::<rustc_query_impl[4cb07e87e9e7fe4a]::DynamicConfig<rustc_query_system[a67ba8233163ff09]::query::caches::SingleCache<rustc_middle[2925b2bddd6380f6]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[4cb07e87e9e7fe4a]::plumbing::QueryCtxt, true>
  36:       0x4c8118038a - rustc_query_impl[4cb07e87e9e7fe4a]::query_impl::upstream_monomorphizations::get_query_incr::__rust_end_short_backtrace
  37:       0x4c815cd781 - rustc_codegen_ssa[b1c1b7eb7f026b0]::back::symbol_export::upstream_monomorphizations_for_provider
  38:       0x4c8108f59a - rustc_query_impl[4cb07e87e9e7fe4a]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[4cb07e87e9e7fe4a]::query_impl::upstream_monomorphizations_for::dynamic_query::{closure#2}::{closure#0}, rustc_middle[2925b2bddd6380f6]::query::erase::Erased<[u8; 8usize]>>
  39:       0x4c810ece40 - <rustc_query_impl[4cb07e87e9e7fe4a]::query_impl::upstream_monomorphizations_for::dynamic_query::{closure#2} as core[ef89fd269bb1fde3]::ops::function::FnOnce<(rustc_middle[2925b2bddd6380f6]::ty::context::TyCtxt, rustc_span[7d624e693cabf70b]::def_id::DefId)>>::call_once
  40:       0x4c8114016d - <rustc_middle[2925b2bddd6380f6]::dep_graph::DepsType as rustc_query_system[a67ba8233163ff09]::dep_graph::Deps>::with_deps::<<rustc_query_system[a67ba8233163ff09]::dep_graph::graph::DepGraphData<rustc_middle[2925b2bddd6380f6]::dep_graph::DepsType>>::with_task<(rustc_query_impl[4cb07e87e9e7fe4a]::plumbing::QueryCtxt, rustc_query_impl[4cb07e87e9e7fe4a]::DynamicConfig<rustc_query_system[a67ba8233163ff09]::query::caches::DefIdCache<rustc_middle[2925b2bddd6380f6]::query::erase::Erased<[u8; 8usize]>>, false, false, false>), rustc_span[7d624e693cabf70b]::def_id::DefId, rustc_middle[2925b2bddd6380f6]::query::erase::Erased<[u8; 8usize]>>::{closure#0}::{closure#0}, rustc_middle[2925b2bddd6380f6]::query::erase::Erased<[u8; 8usize]>>
  41:       0x4c812e21f4 - rustc_query_system[a67ba8233163ff09]::query::plumbing::try_execute_query::<rustc_query_impl[4cb07e87e9e7fe4a]::DynamicConfig<rustc_query_system[a67ba8233163ff09]::query::caches::DefIdCache<rustc_middle[2925b2bddd6380f6]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[4cb07e87e9e7fe4a]::plumbing::QueryCtxt, true>
  42:       0x4c81180682 - rustc_query_impl[4cb07e87e9e7fe4a]::query_impl::upstream_monomorphizations_for::get_query_incr::__rust_end_short_backtrace
  43:       0x4c822f9128 - rustc_middle[2925b2bddd6380f6]::query::plumbing::query_get_at::<rustc_query_system[a67ba8233163ff09]::query::caches::DefIdCache<rustc_middle[2925b2bddd6380f6]::query::erase::Erased<[u8; 8usize]>>>
  44:       0x4c822f5047 - <rustc_middle[2925b2bddd6380f6]::ty::instance::Instance>::upstream_monomorphization
  45:       0x4c7ffc7ed3 - rustc_monomorphize[b03981dddd860dc2]::collector::should_codegen_locally
  46:       0x4c7ffc7b32 - rustc_monomorphize[b03981dddd860dc2]::collector::visit_instance_use
  47:       0x4c7ffc6e9b - <rustc_monomorphize[b03981dddd860dc2]::collector::MirUsedCollector as rustc_middle[2925b2bddd6380f6]::mir::visit::Visitor>::visit_terminator
  48:       0x4c7ffcac33 - rustc_monomorphize[b03981dddd860dc2]::collector::collect_items_of_instance
  49:       0x4c7ffc97b1 - rustc_monomorphize[b03981dddd860dc2]::collector::collect_items_rec
  50:       0x4c7ffe1419 - <alloc[a039d7f8060c3ce2]::vec::into_iter::IntoIter<rustc_middle[2925b2bddd6380f6]::mir::mono::MonoItem> as core[ef89fd269bb1fde3]::iter::traits::iterator::Iterator>::fold::<(), core[ef89fd269bb1fde3]::iter::traits::iterator::Iterator::for_each::call<rustc_middle[2925b2bddd6380f6]::mir::mono::MonoItem, rustc_data_structures[320d23f12382ee71]::sync::parallel::disabled::par_for_each_in<alloc[a039d7f8060c3ce2]::vec::Vec<rustc_middle[2925b2bddd6380f6]::mir::mono::MonoItem>, rustc_monomorphize[b03981dddd860dc2]::collector::collect_crate_mono_items::{closure#1}::{closure#0}>::{closure#0}::{closure#0}>::{closure#0}>
  51:       0x4c80002f2c - <rustc_session[de50bcd412b1e822]::session::Session>::time::<(), rustc_monomorphize[b03981dddd860dc2]::collector::collect_crate_mono_items::{closure#1}>
  52:       0x4c7ffcccac - rustc_monomorphize[b03981dddd860dc2]::collector::collect_crate_mono_items
  53:       0x4c7ffd3a52 - rustc_monomorphize[b03981dddd860dc2]::partitioning::collect_and_partition_mono_items
  54:       0x4c8108f756 - rustc_query_impl[4cb07e87e9e7fe4a]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[4cb07e87e9e7fe4a]::query_impl::collect_and_partition_mono_items::dynamic_query::{closure#2}::{closure#0}, rustc_middle[2925b2bddd6380f6]::query::erase::Erased<[u8; 24usize]>>
  55:       0x4c810ed65c - <rustc_query_impl[4cb07e87e9e7fe4a]::query_impl::collect_and_partition_mono_items::dynamic_query::{closure#2} as core[ef89fd269bb1fde3]::ops::function::FnOnce<(rustc_middle[2925b2bddd6380f6]::ty::context::TyCtxt, ())>>::call_once
  56:       0x4c81347787 - <rustc_query_system[a67ba8233163ff09]::query::plumbing::execute_job_incr<rustc_query_impl[4cb07e87e9e7fe4a]::DynamicConfig<rustc_query_system[a67ba8233163ff09]::query::caches::SingleCache<rustc_middle[2925b2bddd6380f6]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[4cb07e87e9e7fe4a]::plumbing::QueryCtxt>::{closure#2}::{closure#2} as core[ef89fd269bb1fde3]::ops::function::FnOnce<((rustc_query_impl[4cb07e87e9e7fe4a]::plumbing::QueryCtxt, rustc_query_impl[4cb07e87e9e7fe4a]::DynamicConfig<rustc_query_system[a67ba8233163ff09]::query::caches::SingleCache<rustc_middle[2925b2bddd6380f6]::query::erase::Erased<[u8; 24usize]>>, false, false, false>), ())>>::call_once
  57:       0x4c81140528 - <rustc_middle[2925b2bddd6380f6]::dep_graph::DepsType as rustc_query_system[a67ba8233163ff09]::dep_graph::Deps>::with_deps::<<rustc_query_system[a67ba8233163ff09]::dep_graph::graph::DepGraphData<rustc_middle[2925b2bddd6380f6]::dep_graph::DepsType>>::with_task<(rustc_query_impl[4cb07e87e9e7fe4a]::plumbing::QueryCtxt, rustc_query_impl[4cb07e87e9e7fe4a]::DynamicConfig<rustc_query_system[a67ba8233163ff09]::query::caches::SingleCache<rustc_middle[2925b2bddd6380f6]::query::erase::Erased<[u8; 24usize]>>, false, false, false>), (), rustc_middle[2925b2bddd6380f6]::query::erase::Erased<[u8; 24usize]>>::{closure#0}::{closure#0}, rustc_middle[2925b2bddd6380f6]::query::erase::Erased<[u8; 24usize]>>
  58:       0x4c812e75d2 - rustc_query_system[a67ba8233163ff09]::query::plumbing::try_execute_query::<rustc_query_impl[4cb07e87e9e7fe4a]::DynamicConfig<rustc_query_system[a67ba8233163ff09]::query::caches::SingleCache<rustc_middle[2925b2bddd6380f6]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[4cb07e87e9e7fe4a]::plumbing::QueryCtxt, true>
  59:       0x4c8114c8ba - stacker[197e7fdedefd6b6b]::grow::<(rustc_middle[2925b2bddd6380f6]::query::erase::Erased<[u8; 24usize]>, core[ef89fd269bb1fde3]::option::Option<rustc_query_system[a67ba8233163ff09]::dep_graph::graph::DepNodeIndex>), rustc_query_system[a67ba8233163ff09]::query::plumbing::get_query_incr<rustc_query_impl[4cb07e87e9e7fe4a]::DynamicConfig<rustc_query_system[a67ba8233163ff09]::query::caches::SingleCache<rustc_middle[2925b2bddd6380f6]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[4cb07e87e9e7fe4a]::plumbing::QueryCtxt>::{closure#0}>::{closure#0}
  60:       0x4c829511a1 - psm[8bc7155b12ff6a13]::on_stack::with_on_stack::<core[ef89fd269bb1fde3]::option::Option<alloc[a039d7f8060c3ce2]::boxed::Box<dyn core[ef89fd269bb1fde3]::any::Any + core[ef89fd269bb1fde3]::marker::Send>>, stacker[197e7fdedefd6b6b]::_grow::{closure#0}>
  61:       0x4c82951bd9 - rust_psm_on_stack
  62:       0x4c82951944 - stacker[197e7fdedefd6b6b]::_grow
  63:       0x4c8118a531 - rustc_query_impl[4cb07e87e9e7fe4a]::query_impl::collect_and_partition_mono_items::get_query_incr::__rust_end_short_backtrace
  64:       0x4c7cf102a8 - rustc_codegen_ssa[b1c1b7eb7f026b0]::base::codegen_crate::<rustc_codegen_llvm[12307632b499b090]::LlvmCodegenBackend>
  65:       0x4c7ce76e99 - <rustc_codegen_llvm[12307632b499b090]::LlvmCodegenBackend as rustc_codegen_ssa[b1c1b7eb7f026b0]::traits::backend::CodegenBackend>::codegen_crate
  66:       0x4c7cd712f0 - <rustc_interface[e174538ead04500f]::queries::Linker>::codegen_and_build_linker
  67:       0x4c7caf4205 - <rustc_middle[2925b2bddd6380f6]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[8e64d6185ae46551]::run_compiler::{closure#0}::{closure#1}::{closure#6}, core[ef89fd269bb1fde3]::result::Result<core[ef89fd269bb1fde3]::option::Option<rustc_interface[e174538ead04500f]::queries::Linker>, rustc_span[7d624e693cabf70b]::ErrorGuaranteed>>
  68:       0x4c7cb251e5 - <rustc_interface[e174538ead04500f]::queries::QueryResult<&rustc_middle[2925b2bddd6380f6]::ty::context::GlobalCtxt>>::enter::<core[ef89fd269bb1fde3]::result::Result<core[ef89fd269bb1fde3]::option::Option<rustc_interface[e174538ead04500f]::queries::Linker>, rustc_span[7d624e693cabf70b]::ErrorGuaranteed>, rustc_driver_impl[8e64d6185ae46551]::run_compiler::{closure#0}::{closure#1}::{closure#6}>
  69:       0x4c7cb2d4e7 - <rustc_interface[e174538ead04500f]::interface::Compiler>::enter::<rustc_driver_impl[8e64d6185ae46551]::run_compiler::{closure#0}::{closure#1}, core[ef89fd269bb1fde3]::result::Result<core[ef89fd269bb1fde3]::option::Option<rustc_interface[e174538ead04500f]::queries::Linker>, rustc_span[7d624e693cabf70b]::ErrorGuaranteed>>
  70:       0x4c7caf21c8 - rustc_span[7d624e693cabf70b]::create_session_globals_then::<core[ef89fd269bb1fde3]::result::Result<(), rustc_span[7d624e693cabf70b]::ErrorGuaranteed>, rustc_interface[e174538ead04500f]::util::run_in_thread_with_globals<rustc_interface[e174538ead04500f]::interface::run_compiler<core[ef89fd269bb1fde3]::result::Result<(), rustc_span[7d624e693cabf70b]::ErrorGuaranteed>, rustc_driver_impl[8e64d6185ae46551]::run_compiler::{closure#0}>::{closure#1}, core[ef89fd269bb1fde3]::result::Result<(), rustc_span[7d624e693cabf70b]::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}>
  71:       0x4c7cb018b2 - std[9b903c7c25c6c255]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[e174538ead04500f]::util::run_in_thread_with_globals<rustc_interface[e174538ead04500f]::interface::run_compiler<core[ef89fd269bb1fde3]::result::Result<(), rustc_span[7d624e693cabf70b]::ErrorGuaranteed>, rustc_driver_impl[8e64d6185ae46551]::run_compiler::{closure#0}>::{closure#1}, core[ef89fd269bb1fde3]::result::Result<(), rustc_span[7d624e693cabf70b]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[ef89fd269bb1fde3]::result::Result<(), rustc_span[7d624e693cabf70b]::ErrorGuaranteed>>
  72:       0x4c7cafac00 - <<std[9b903c7c25c6c255]::thread::Builder>::spawn_unchecked_<rustc_interface[e174538ead04500f]::util::run_in_thread_with_globals<rustc_interface[e174538ead04500f]::interface::run_compiler<core[ef89fd269bb1fde3]::result::Result<(), rustc_span[7d624e693cabf70b]::ErrorGuaranteed>, rustc_driver_impl[8e64d6185ae46551]::run_compiler::{closure#0}>::{closure#1}, core[ef89fd269bb1fde3]::result::Result<(), rustc_span[7d624e693cabf70b]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[ef89fd269bb1fde3]::result::Result<(), rustc_span[7d624e693cabf70b]::ErrorGuaranteed>>::{closure#1} as core[ef89fd269bb1fde3]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  73:       0x4c8299f65b - std::sys::pal::unix::thread::Thread::new::thread_start::h62d18fcbfbd40697
  74:      0x1eaa3641338 - _ZL20pthread_thread_entryPvS_
  75:     0x7fffdf049258 - <unknown>

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.83.0 (90b35a623 2024-11-26) running on x86_64-unknown-haiku

note: compiler flags: --crate-type bin -C embed-bitcode=no -C incremental=[REDACTED]

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

query stack during panic:
#0 [exported_symbols] collecting exported symbols for crate `33`
#1 [upstream_monomorphizations] collecting available upstream monomorphizations
end of query stack
error: could not compile `scallop-core` (build script)

Caused by:
  process didn't exit successfully: `rustc --crate-name build_script_build --edition=2018 core/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=103 --crate-type bin --emit=dep-info,link -C embed-bitcode=no --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values())' -C metadata=87acb25be246ebdd -C extra-filename=-87acb25be246ebdd --out-dir /boot/home/src/git/rust-libs/scallop/target/debug/build/scallop-core-87acb25be246ebdd -C incremental=/boot/home/src/git/rust-libs/scallop/target/debug/incremental -L dependency=/boot/home/src/git/rust-libs/scallop/target/debug/deps --extern lalrpop=/boot/home/src/git/rust-libs/scallop/target/debug/deps/liblalrpop-8fed3b4b9b05dec7.rlib` (exit status: 101)
warning: build failed, waiting for other jobs to finish...

~/src/git/rust-libs/scallop> RUST_BACKTRACE=1 cargo build
   Compiling scallop-core v0.2.5 (/boot/home/src/git/rust-libs/scallop/core)
   Compiling minimal-lexical v0.2.1
   Compiling tinyvec_macros v0.1.1
   Compiling dirs v4.0.0
thread 'rustc' panicked at /build/rust/compiler/rustc_serialize/src/serialize.rs:123:9:
assertion failed: bytes[len] == STR_SENTINEL
stack backtrace:
   Compiling tinyvec v1.9.0
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic
   3: <rustc_metadata::rmeta::decoder::DecodeContext as rustc_span::SpanDecoder>::decode_symbol
   4: <rustc_middle::ty::VariantDef as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
   5: <alloc::vec::Vec<rustc_middle::ty::VariantDef> as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
   6: <rustc_type_ir::ty_kind::TyKind<rustc_middle::ty::context::TyCtxt> as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
   7: <rustc_middle::ty::Ty as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
   8: <rustc_metadata::rmeta::decoder::DecodeContext as rustc_type_ir::codec::TyDecoder>::cached_ty_for_shorthand::<<rustc_middle::ty::Ty as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode::{closure#0}>
   9: <rustc_middle::ty::Ty as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
  10: <rustc_type_ir::generic_arg::GenericArgKind<rustc_middle::ty::context::TyCtxt> as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
  11: <rustc_middle::ty::generic_args::GenericArg as rustc_type_ir::interner::CollectAndApply<rustc_middle::ty::generic_args::GenericArg, &rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg>>>::collect_and_apply::<core::iter::adapters::map::Map<core::ops::range::Range<usize>, <&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode::{closure#0}>, <rustc_middle::ty::context::TyCtxt>::mk_args_from_iter<core::iter::adapters::map::Map<core::ops::range::Range<usize>, <&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode::{closure#0}>, rustc_middle::ty::generic_args::GenericArg>::{closure#0}>
  12: <&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
  13: <(rustc_middle::middle::exported_symbols::ExportedSymbol, rustc_middle::middle::exported_symbols::SymbolExportInfo) as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
  14: <rustc_metadata::creader::CrateMetadataRef>::exported_symbols
  15: rustc_metadata::rmeta::decoder::cstore_impl::provide_extern::exported_symbols
      [... omitted 4 frames ...]
  16: rustc_codegen_ssa::back::symbol_export::upstream_monomorphizations_provider
      [... omitted 3 frames ...]
  17: rustc_codegen_ssa::back::symbol_export::upstream_monomorphizations_for_provider
      [... omitted 3 frames ...]
  18: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::DefIdCache<rustc_middle::query::erase::Erased<[u8; 8]>>>
  19: <rustc_middle::ty::instance::Instance>::upstream_monomorphization
  20: rustc_monomorphize::collector::should_codegen_locally
  21: rustc_monomorphize::collector::visit_instance_use
  22: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_terminator
  23: rustc_monomorphize::collector::collect_items_of_instance
  24: rustc_monomorphize::collector::collect_items_rec
  25: <alloc::vec::into_iter::IntoIter<rustc_middle::mir::mono::MonoItem> as core::iter::traits::iterator::Iterator>::fold::<(), core::iter::traits::iterator::Iterator::for_each::call<rustc_middle::mir::mono::MonoItem, rustc_data_structures::sync::parallel::disabled::par_for_each_in<alloc::vec::Vec<rustc_middle::mir::mono::MonoItem>, rustc_monomorphize::collector::collect_crate_mono_items::{closure#1}::{closure#0}>::{closure#0}::{closure#0}>::{closure#0}>
  26: <rustc_session::session::Session>::time::<(), rustc_monomorphize::collector::collect_crate_mono_items::{closure#1}>
  27: rustc_monomorphize::collector::collect_crate_mono_items
  28: rustc_monomorphize::partitioning::collect_and_partition_mono_items
      [... omitted 8 frames ...]
  29: rustc_codegen_ssa::base::codegen_crate::<rustc_codegen_llvm::LlvmCodegenBackend>
  30: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
  31: <rustc_interface::queries::Linker>::codegen_and_build_linker
  32: <rustc_middle::ty::context::GlobalCtxt>::enter::<rustc_driver_impl::run_compiler::{closure#0}::{closure#1}::{closure#6}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_span::ErrorGuaranteed>>
  33: <rustc_interface::queries::QueryResult<&rustc_middle::ty::context::GlobalCtxt>>::enter::<core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}::{closure#1}::{closure#6}>
  34: <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>>
  35: rustc_span::create_session_globals_then::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_interface::util::run_in_thread_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}::{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.83.0 (90b35a623 2024-11-26) running on x86_64-unknown-haiku

note: compiler flags: --crate-type bin -C embed-bitcode=no -C incremental=[REDACTED]

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

query stack during panic:
#0 [exported_symbols] collecting exported symbols for crate `33`
#1 [upstream_monomorphizations] collecting available upstream monomorphizations
#2 [upstream_monomorphizations_for] collecting available upstream monomorphizations for `core::result::Result::<T, E>::unwrap`
#3 [collect_and_partition_mono_items] collect_and_partition_mono_items
end of query stack
error: could not compile `scallop-core` (build script)

Caused by:
  process didn't exit successfully: `rustc --crate-name build_script_build --edition=2018 core/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=103 --crate-type bin --emit=dep-info,link -C embed-bitcode=no --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values())' -C metadata=87acb25be246ebdd -C extra-filename=-87acb25be246ebdd --out-dir /boot/home/src/git/rust-libs/scallop/target/debug/build/scallop-core-87acb25be246ebdd -C incremental=/boot/home/src/git/rust-libs/scallop/target/debug/incremental -L dependency=/boot/home/src/git/rust-libs/scallop/target/debug/deps --extern lalrpop=/boot/home/src/git/rust-libs/scallop/target/debug/deps/liblalrpop-8fed3b4b9b05dec7.rlib` (exit status: 101)
warning: build failed, waiting for other jobs to finish...

@hoanga hoanga 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 Mar 23, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 23, 2025
@saethlin
Copy link
Member

This ICE is usually from a corrupted rmeta file. If you run cargo clean then cargo build, does the clean build succeed?

You filled out the issue template as if this can be reproduced by a clean build, but also your paste of compiler output is clearly not a clean build. If you encountered this while hacking on scallop, it is likely that this is some kind of incremental compilation state corruption issue. The incremental compilation system relies on both hardlinks and file locking working correctly, so it's quite possible that those features are subtly buggy on Haiku, or just work differently.

@saethlin saethlin added A-incr-comp Area: Incremental compilation and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Mar 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incr-comp Area: Incremental compilation 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

3 participants