Skip to content

Instantly share code, notes, and snippets.

@orangecms
Created September 30, 2022 08:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save orangecms/f050ca8a74fdf6c239459cc01e0e15dd to your computer and use it in GitHub Desktop.
Save orangecms/f050ca8a74fdf6c239459cc01e0e15dd to your computer and use it in GitHub Desktop.
first time I get a Rust compiler error
warning: `pe-loader` (lib) generated 1 warning
Compiling rust-firmware-layout v0.1.0 (/home/dama/Projects/Fiedka/uefi-pi-rs/rust-firmware-layout)
thread 'rustc' panicked at 'failed to lookup `SourceFile` in new context', compiler/rustc_query_impl/src/on_disk_cache.rs:514:22
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/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: rustc 1.60.0-nightly (89b9f7b28 2022-01-10) running on x86_64-unknown-linux-gnu
note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type bin
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
thread 'rustc' panicked at 'Illegal read of: 11621', /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/compiler/rustc_query_system/src/dep_graph/graph.rs:430:25
stack backtrace:
0: 0x7f63bc896e2c - std::backtrace_rs::backtrace::libunwind::trace::hee56aa883c63acb5
at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: 0x7f63bc896e2c - std::backtrace_rs::backtrace::trace_unsynchronized::he7cac0994dc78c4c
at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x7f63bc896e2c - std::sys_common::backtrace::_print_fmt::hdc12a102f76753bd
at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/std/src/sys_common/backtrace.rs:67:5
3: 0x7f63bc896e2c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hf7faa06c147903ce
at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/std/src/sys_common/backtrace.rs:46:22
4: 0x7f63bc8f7b1c - core::fmt::write::h66e8369cb6d370fa
at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/core/src/fmt/mod.rs:1168:17
5: 0x7f63bc886273 - std::io::Write::write_fmt::h74797452eefbc651
at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/std/src/io/mod.rs:1653:15
6: 0x7f63bc89b2f2 - std::sys_common::backtrace::_print::h82e64c28f7109909
at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/std/src/sys_common/backtrace.rs:49:5
7: 0x7f63bc89b2f2 - std::sys_common::backtrace::print::hef2d97a7e889059a
at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/std/src/sys_common/backtrace.rs:36:9
8: 0x7f63bc89b2f2 - std::panicking::default_hook::{{closure}}::hc4f2f631c593350e
at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/std/src/panicking.rs:211:50
9: 0x7f63bc89aed5 - std::panicking::default_hook::he01061695065e502
at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/std/src/panicking.rs:228:9
10: 0x7f63bd11e7a1 - rustc_driver[124b6e8ee7de516c]::DEFAULT_HOOK::{closure#0}::{closure#0}
11: 0x7f63adfc4f63 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::he7831ee3fedd2c01
at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/alloc/src/boxed.rs:1868:9
12: 0x7f63adff5dfd - proc_macro::bridge::client::<impl proc_macro::bridge::Bridge>::enter::{{closure}}::{{closure}}::ha780fd7d4a7953be
at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/proc_macro/src/bridge/client.rs:320:21
13: 0x7f63bc89baa5 - std::panicking::rust_panic_with_hook::h3ad36e38c2432eec
at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/std/src/panicking.rs:610:17
14: 0x7f63bc89b7a0 - std::panicking::begin_panic_handler::{{closure}}::hc909e1e15fb3ebac
at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/std/src/panicking.rs:502:13
15: 0x7f63bc8972d4 - std::sys_common::backtrace::__rust_end_short_backtrace::hfcf0febb37587b3d
at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/std/src/sys_common/backtrace.rs:139:18
16: 0x7f63bc89b4d9 - rust_begin_unwind
at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/std/src/panicking.rs:498:5
17: 0x7f63bc8630e1 - core::panicking::panic_fmt::h6a50bf58d4eb52b4
at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/core/src/panicking.rs:110:14
18: 0x7f63beeb8d23 - <rustc_middle[c28a39089ade0ee0]::dep_graph::dep_node::DepKind as rustc_query_system[9128b41c1b585745]::dep_graph::DepKind>::read_deps::<<rustc_query_system[9128b41c1b585745]::dep_graph::graph::DepGraph<rustc_middle[c28a39089ade0ee0]::dep_graph::dep_node::DepKind>>::read_index::{closure#0}>
19: 0x7f63bf833957 - <rustc_middle[c28a39089ade0ee0]::ty::print::pretty::FmtPrinter<&mut alloc[fda8cd89518443b]::string::String> as rustc_middle[c28a39089ade0ee0]::ty::print::Printer>::print_def_path
20: 0x7f63bf837f0d - <rustc_middle[c28a39089ade0ee0]::ty::print::pretty::FmtPrinter<&mut alloc[fda8cd89518443b]::string::String> as rustc_middle[c28a39089ade0ee0]::ty::print::Printer>::default_print_def_path
21: 0x7f63bf83372f - <rustc_middle[c28a39089ade0ee0]::ty::print::pretty::FmtPrinter<&mut alloc[fda8cd89518443b]::string::String> as rustc_middle[c28a39089ade0ee0]::ty::print::Printer>::print_def_path
22: 0x7f63bf84a1b2 - <rustc_middle[c28a39089ade0ee0]::ty::context::TyCtxt>::def_path_str_with_substs
23: 0x7f63bf84a094 - <rustc_middle[c28a39089ade0ee0]::ty::context::TyCtxt>::def_path_str
24: 0x7f63bdb42e61 - <std[916c2bf46ef025b0]::thread::local::LocalKey<core[764d4fa4047e6cd7]::cell::Cell<bool>>>::with::<rustc_middle[c28a39089ade0ee0]::ty::print::pretty::with_no_trimmed_paths<<rustc_query_impl[1a0f6329139f4bdf]::queries::optimized_mir as rustc_query_system[9128b41c1b585745]::query::config::QueryDescription<rustc_query_impl[1a0f6329139f4bdf]::plumbing::QueryCtxt>>::describe::{closure#0}, alloc[fda8cd89518443b]::string::String>::{closure#0}, alloc[fda8cd89518443b]::string::String>
25: 0x7f63bdbcbbe8 - <rustc_query_impl[1a0f6329139f4bdf]::queries::optimized_mir as rustc_query_system[9128b41c1b585745]::query::config::QueryDescription<rustc_query_impl[1a0f6329139f4bdf]::plumbing::QueryCtxt>>::describe
26: 0x7f63bdb5db77 - <std[916c2bf46ef025b0]::thread::local::LocalKey<core[764d4fa4047e6cd7]::cell::Cell<bool>>>::with::<rustc_middle[c28a39089ade0ee0]::ty::print::pretty::with_forced_impl_filename_line<rustc_query_impl[1a0f6329139f4bdf]::make_query::optimized_mir::{closure#0}::{closure#0}, alloc[fda8cd89518443b]::string::String>::{closure#0}, alloc[fda8cd89518443b]::string::String>
27: 0x7f63bdb52949 - <std[916c2bf46ef025b0]::thread::local::LocalKey<core[764d4fa4047e6cd7]::cell::Cell<bool>>>::with::<rustc_middle[c28a39089ade0ee0]::ty::print::pretty::with_no_visible_paths<rustc_query_impl[1a0f6329139f4bdf]::make_query::optimized_mir::{closure#0}, alloc[fda8cd89518443b]::string::String>::{closure#0}, alloc[fda8cd89518443b]::string::String>
28: 0x7f63bdb80235 - rustc_query_impl[1a0f6329139f4bdf]::make_query::optimized_mir
29: 0x7f63bd96942b - <rustc_query_system[9128b41c1b585745]::query::plumbing::QueryState<rustc_middle[c28a39089ade0ee0]::dep_graph::dep_node::DepKind, rustc_span[e53caedf36619d5c]::def_id::DefId>>::try_collect_active_jobs::<rustc_query_impl[1a0f6329139f4bdf]::plumbing::QueryCtxt>
30: 0x7f63bda1ae4f - <rustc_query_impl[1a0f6329139f4bdf]::Queries>::try_collect_active_jobs
31: 0x7f63bdb25624 - <rustc_query_impl[1a0f6329139f4bdf]::plumbing::QueryCtxt>::try_print_query_stack
32: 0x7f63bd211922 - rustc_interface[11117f0be3129212]::interface::try_print_query_stack
33: 0x7f63bd11eb97 - rustc_driver[124b6e8ee7de516c]::report_ice
34: 0x7f63adfc4f63 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::he7831ee3fedd2c01
at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/alloc/src/boxed.rs:1868:9
35: 0x7f63adff5dfd - proc_macro::bridge::client::<impl proc_macro::bridge::Bridge>::enter::{{closure}}::{{closure}}::ha780fd7d4a7953be
at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/proc_macro/src/bridge/client.rs:320:21
36: 0x7f63bc89baa5 - std::panicking::rust_panic_with_hook::h3ad36e38c2432eec
at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/std/src/panicking.rs:610:17
37: 0x7f63bc89b7a0 - std::panicking::begin_panic_handler::{{closure}}::hc909e1e15fb3ebac
at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/std/src/panicking.rs:502:13
38: 0x7f63bc8972d4 - std::sys_common::backtrace::__rust_end_short_backtrace::hfcf0febb37587b3d
at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/std/src/sys_common/backtrace.rs:139:18
39: 0x7f63bc89b4d9 - rust_begin_unwind
at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/std/src/panicking.rs:498:5
40: 0x7f63bc8630e1 - core::panicking::panic_fmt::h6a50bf58d4eb52b4
at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/core/src/panicking.rs:110:14
41: 0x7f63bc8f4911 - core::panicking::panic_display::h5e1c7590c7b288ad
at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/core/src/panicking.rs:65:5
42: 0x7f63bc8f48bb - core::panicking::panic_str::he1517cd19c9a9397
at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/core/src/panicking.rs:56:5
43: 0x7f63bc862fd6 - core::option::expect_failed::h50803b3eaf026992
at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/core/src/option.rs:1817:5
44: 0x7f63beafa7c0 - <rustc_span[e53caedf36619d5c]::span_encoding::Span as rustc_serialize[7551927e345bc7b0]::serialize::Decodable<rustc_query_impl[1a0f6329139f4bdf]::on_disk_cache::CacheDecoder>>::decode
45: 0x7f63beaf53bb - <rustc_middle[c28a39089ade0ee0]::ty::VariantDef as rustc_serialize[7551927e345bc7b0]::serialize::Decodable<rustc_query_impl[1a0f6329139f4bdf]::on_disk_cache::CacheDecoder>>::decode
46: 0x7f63beab8367 - <rustc_query_impl[1a0f6329139f4bdf]::on_disk_cache::CacheDecoder as rustc_serialize[7551927e345bc7b0]::serialize::Decoder>::read_seq::<alloc[fda8cd89518443b]::vec::Vec<rustc_middle[c28a39089ade0ee0]::ty::VariantDef>, <alloc[fda8cd89518443b]::vec::Vec<rustc_middle[c28a39089ade0ee0]::ty::VariantDef> as rustc_serialize[7551927e345bc7b0]::serialize::Decodable<rustc_query_impl[1a0f6329139f4bdf]::on_disk_cache::CacheDecoder>>::decode::{closure#0}>
47: 0x7f63bf546357 - <rustc_middle[c28a39089ade0ee0]::ty::adt::AdtDef as rustc_serialize[7551927e345bc7b0]::serialize::Decodable<rustc_query_impl[1a0f6329139f4bdf]::on_disk_cache::CacheDecoder>>::decode
48: 0x7f63beaa054b - <rustc_middle[c28a39089ade0ee0]::ty::sty::TyKind as rustc_serialize[7551927e345bc7b0]::serialize::Decodable<rustc_query_impl[1a0f6329139f4bdf]::on_disk_cache::CacheDecoder>>::decode
49: 0x7f63beaed3a1 - <&rustc_middle[c28a39089ade0ee0]::ty::TyS as rustc_serialize[7551927e345bc7b0]::serialize::Decodable<rustc_query_impl[1a0f6329139f4bdf]::on_disk_cache::CacheDecoder>>::decode
50: 0x7f63beab8e35 - <rustc_query_impl[1a0f6329139f4bdf]::on_disk_cache::CacheDecoder as rustc_serialize[7551927e345bc7b0]::serialize::Decoder>::read_seq::<alloc[fda8cd89518443b]::vec::Vec<rustc_middle[c28a39089ade0ee0]::mir::LocalDecl>, <alloc[fda8cd89518443b]::vec::Vec<rustc_middle[c28a39089ade0ee0]::mir::LocalDecl> as rustc_serialize[7551927e345bc7b0]::serialize::Decodable<rustc_query_impl[1a0f6329139f4bdf]::on_disk_cache::CacheDecoder>>::decode::{closure#0}>
51: 0x7f63bf5497e7 - <rustc_middle[c28a39089ade0ee0]::mir::Body as rustc_serialize[7551927e345bc7b0]::serialize::Decodable<rustc_query_impl[1a0f6329139f4bdf]::on_disk_cache::CacheDecoder>>::decode
52: 0x7f63bf5636f8 - <rustc_query_impl[1a0f6329139f4bdf]::on_disk_cache::OnDiskCache>::try_load_query_result::<&rustc_middle[c28a39089ade0ee0]::mir::Body>
53: 0x7f63bf5dfdcb - <rustc_middle[c28a39089ade0ee0]::dep_graph::dep_node::DepKind as rustc_query_system[9128b41c1b585745]::dep_graph::DepKind>::with_deps::<rustc_query_system[9128b41c1b585745]::query::plumbing::try_load_from_disk_and_cache_in_memory<rustc_query_impl[1a0f6329139f4bdf]::plumbing::QueryCtxt, rustc_span[e53caedf36619d5c]::def_id::DefId, &rustc_middle[c28a39089ade0ee0]::mir::Body>::{closure#0}, core[764d4fa4047e6cd7]::option::Option<&rustc_middle[c28a39089ade0ee0]::mir::Body>>
54: 0x7f63bf5813d6 - <rustc_query_system[9128b41c1b585745]::dep_graph::graph::DepGraph<rustc_middle[c28a39089ade0ee0]::dep_graph::dep_node::DepKind>>::with_query_deserialization::<rustc_query_system[9128b41c1b585745]::query::plumbing::try_load_from_disk_and_cache_in_memory<rustc_query_impl[1a0f6329139f4bdf]::plumbing::QueryCtxt, rustc_span[e53caedf36619d5c]::def_id::DefId, &rustc_middle[c28a39089ade0ee0]::mir::Body>::{closure#0}, core[764d4fa4047e6cd7]::option::Option<&rustc_middle[c28a39089ade0ee0]::mir::Body>>
55: 0x7f63bf4b1aca - rustc_query_system[9128b41c1b585745]::query::plumbing::try_load_from_disk_and_cache_in_memory::<rustc_query_impl[1a0f6329139f4bdf]::plumbing::QueryCtxt, rustc_span[e53caedf36619d5c]::def_id::DefId, &rustc_middle[c28a39089ade0ee0]::mir::Body>
56: 0x7f63bea30c41 - rustc_query_system[9128b41c1b585745]::query::plumbing::try_execute_query::<rustc_query_impl[1a0f6329139f4bdf]::plumbing::QueryCtxt, rustc_query_system[9128b41c1b585745]::query::caches::DefaultCache<rustc_span[e53caedf36619d5c]::def_id::DefId, &rustc_middle[c28a39089ade0ee0]::mir::Body>>
57: 0x7f63bea90557 - <rustc_query_impl[1a0f6329139f4bdf]::Queries as rustc_middle[c28a39089ade0ee0]::ty::query::QueryEngine>::optimized_mir
58: 0x7f63beea488e - <rustc_middle[c28a39089ade0ee0]::ty::context::TyCtxt>::instance_mir
59: 0x7f63be468256 - rustc_monomorphize[2b914775a192fc39]::collector::collect_neighbours
60: 0x7f63be463ab5 - rustc_monomorphize[2b914775a192fc39]::collector::collect_items_rec
61: 0x7f63be463bf5 - rustc_monomorphize[2b914775a192fc39]::collector::collect_items_rec
62: 0x7f63bf17a82f - <rustc_session[10fb4eff5f95d231]::session::Session>::time::<(), rustc_monomorphize[2b914775a192fc39]::collector::collect_crate_mono_items::{closure#1}>
63: 0x7f63bf183039 - rustc_monomorphize[2b914775a192fc39]::collector::collect_crate_mono_items
64: 0x7f63bf1817f3 - rustc_monomorphize[2b914775a192fc39]::partitioning::collect_and_partition_mono_items
65: 0x7f63bdb9ca50 - <rustc_middle[c28a39089ade0ee0]::dep_graph::dep_node::DepKind as rustc_query_system[9128b41c1b585745]::dep_graph::DepKind>::with_deps::<<rustc_query_system[9128b41c1b585745]::dep_graph::graph::DepGraph<rustc_middle[c28a39089ade0ee0]::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_middle[c28a39089ade0ee0]::ty::context::TyCtxt, (), (&std[916c2bf46ef025b0]::collections::hash::set::HashSet<rustc_span[e53caedf36619d5c]::def_id::DefId, core[764d4fa4047e6cd7]::hash::BuildHasherDefault<rustc_hash[e786982ea05e1693]::FxHasher>>, &[rustc_middle[c28a39089ade0ee0]::mir::mono::CodegenUnit])>::{closure#0}, (&std[916c2bf46ef025b0]::collections::hash::set::HashSet<rustc_span[e53caedf36619d5c]::def_id::DefId, core[764d4fa4047e6cd7]::hash::BuildHasherDefault<rustc_hash[e786982ea05e1693]::FxHasher>>, &[rustc_middle[c28a39089ade0ee0]::mir::mono::CodegenUnit])>
66: 0x7f63bdaec98f - <rustc_query_system[9128b41c1b585745]::dep_graph::graph::DepGraph<rustc_middle[c28a39089ade0ee0]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[c28a39089ade0ee0]::ty::context::TyCtxt, (), (&std[916c2bf46ef025b0]::collections::hash::set::HashSet<rustc_span[e53caedf36619d5c]::def_id::DefId, core[764d4fa4047e6cd7]::hash::BuildHasherDefault<rustc_hash[e786982ea05e1693]::FxHasher>>, &[rustc_middle[c28a39089ade0ee0]::mir::mono::CodegenUnit])>
67: 0x7f63bda164ed - rustc_data_structures[d97a00af90db2ea8]::stack::ensure_sufficient_stack::<((&std[916c2bf46ef025b0]::collections::hash::set::HashSet<rustc_span[e53caedf36619d5c]::def_id::DefId, core[764d4fa4047e6cd7]::hash::BuildHasherDefault<rustc_hash[e786982ea05e1693]::FxHasher>>, &[rustc_middle[c28a39089ade0ee0]::mir::mono::CodegenUnit]), rustc_query_system[9128b41c1b585745]::dep_graph::graph::DepNodeIndex), rustc_query_system[9128b41c1b585745]::query::plumbing::execute_job<rustc_query_impl[1a0f6329139f4bdf]::plumbing::QueryCtxt, (), (&std[916c2bf46ef025b0]::collections::hash::set::HashSet<rustc_span[e53caedf36619d5c]::def_id::DefId, core[764d4fa4047e6cd7]::hash::BuildHasherDefault<rustc_hash[e786982ea05e1693]::FxHasher>>, &[rustc_middle[c28a39089ade0ee0]::mir::mono::CodegenUnit])>::{closure#3}>
68: 0x7f63bf49c1eb - rustc_query_system[9128b41c1b585745]::query::plumbing::try_execute_query::<rustc_query_impl[1a0f6329139f4bdf]::plumbing::QueryCtxt, rustc_query_system[9128b41c1b585745]::query::caches::DefaultCache<(), (&std[916c2bf46ef025b0]::collections::hash::set::HashSet<rustc_span[e53caedf36619d5c]::def_id::DefId, core[764d4fa4047e6cd7]::hash::BuildHasherDefault<rustc_hash[e786982ea05e1693]::FxHasher>>, &[rustc_middle[c28a39089ade0ee0]::mir::mono::CodegenUnit])>>
69: 0x7f63bf4ead10 - rustc_query_system[9128b41c1b585745]::query::plumbing::get_query::<rustc_query_impl[1a0f6329139f4bdf]::queries::collect_and_partition_mono_items, rustc_query_impl[1a0f6329139f4bdf]::plumbing::QueryCtxt>
70: 0x7f63bf52e91e - <rustc_query_impl[1a0f6329139f4bdf]::Queries as rustc_middle[c28a39089ade0ee0]::ty::query::QueryEngine>::collect_and_partition_mono_items
71: 0x7f63bf0574ca - <rustc_codegen_llvm[4f8001fe24439afd]::LlvmCodegenBackend as rustc_codegen_ssa[a8846c18ea6747a9]::traits::backend::CodegenBackend>::codegen_crate
72: 0x7f63bf00db17 - <rustc_session[10fb4eff5f95d231]::session::Session>::time::<alloc[fda8cd89518443b]::boxed::Box<dyn core[764d4fa4047e6cd7]::any::Any>, rustc_interface[11117f0be3129212]::passes::start_codegen::{closure#0}>
73: 0x7f63beff3116 - <rustc_interface[11117f0be3129212]::queries::Queries>::ongoing_codegen
74: 0x7f63befcd544 - <rustc_interface[11117f0be3129212]::interface::Compiler>::enter::<rustc_driver[124b6e8ee7de516c]::run_compiler::{closure#1}::{closure#2}, core[764d4fa4047e6cd7]::result::Result<core[764d4fa4047e6cd7]::option::Option<rustc_interface[11117f0be3129212]::queries::Linker>, rustc_errors[106e1e27ea6e8b93]::ErrorReported>>
75: 0x7f63befaf10c - rustc_span[e53caedf36619d5c]::with_source_map::<core[764d4fa4047e6cd7]::result::Result<(), rustc_errors[106e1e27ea6e8b93]::ErrorReported>, rustc_interface[11117f0be3129212]::interface::create_compiler_and_run<core[764d4fa4047e6cd7]::result::Result<(), rustc_errors[106e1e27ea6e8b93]::ErrorReported>, rustc_driver[124b6e8ee7de516c]::run_compiler::{closure#1}>::{closure#1}>
76: 0x7f63befcc8ce - rustc_interface[11117f0be3129212]::interface::create_compiler_and_run::<core[764d4fa4047e6cd7]::result::Result<(), rustc_errors[106e1e27ea6e8b93]::ErrorReported>, rustc_driver[124b6e8ee7de516c]::run_compiler::{closure#1}>
77: 0x7f63befb066b - <scoped_tls[f562bb10605cb79e]::ScopedKey<rustc_span[e53caedf36619d5c]::SessionGlobals>>::set::<rustc_interface[11117f0be3129212]::util::setup_callbacks_and_run_in_thread_pool_with_globals<rustc_interface[11117f0be3129212]::interface::run_compiler<core[764d4fa4047e6cd7]::result::Result<(), rustc_errors[106e1e27ea6e8b93]::ErrorReported>, rustc_driver[124b6e8ee7de516c]::run_compiler::{closure#1}>::{closure#0}, core[764d4fa4047e6cd7]::result::Result<(), rustc_errors[106e1e27ea6e8b93]::ErrorReported>>::{closure#0}::{closure#0}, core[764d4fa4047e6cd7]::result::Result<(), rustc_errors[106e1e27ea6e8b93]::ErrorReported>>
78: 0x7f63befb0465 - std[916c2bf46ef025b0]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[11117f0be3129212]::util::setup_callbacks_and_run_in_thread_pool_with_globals<rustc_interface[11117f0be3129212]::interface::run_compiler<core[764d4fa4047e6cd7]::result::Result<(), rustc_errors[106e1e27ea6e8b93]::ErrorReported>, rustc_driver[124b6e8ee7de516c]::run_compiler::{closure#1}>::{closure#0}, core[764d4fa4047e6cd7]::result::Result<(), rustc_errors[106e1e27ea6e8b93]::ErrorReported>>::{closure#0}, core[764d4fa4047e6cd7]::result::Result<(), rustc_errors[106e1e27ea6e8b93]::ErrorReported>>
79: 0x7f63befdce89 - <<std[916c2bf46ef025b0]::thread::Builder>::spawn_unchecked<rustc_interface[11117f0be3129212]::util::setup_callbacks_and_run_in_thread_pool_with_globals<rustc_interface[11117f0be3129212]::interface::run_compiler<core[764d4fa4047e6cd7]::result::Result<(), rustc_errors[106e1e27ea6e8b93]::ErrorReported>, rustc_driver[124b6e8ee7de516c]::run_compiler::{closure#1}>::{closure#0}, core[764d4fa4047e6cd7]::result::Result<(), rustc_errors[106e1e27ea6e8b93]::ErrorReported>>::{closure#0}, core[764d4fa4047e6cd7]::result::Result<(), rustc_errors[106e1e27ea6e8b93]::ErrorReported>>::{closure#1} as core[764d4fa4047e6cd7]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
80: 0x7f63bc8a6ff3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h2bcfd99b08705230
at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/alloc/src/boxed.rs:1854:9
81: 0x7f63bc8a6ff3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h0f130cf6103d60eb
at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/alloc/src/boxed.rs:1854:9
82: 0x7f63bc8a6ff3 - std::sys::unix::thread::Thread::new::thread_start::h6f8833ccf099272e
at /rustc/89b9f7b284aacc5f8613438b80e4dd7bdd10549e/library/std/src/sys/unix/thread.rs:108:17
83: 0x7f63bc494b43 - start_thread
at ./nptl/./nptl/pthread_create.c:442:8
84: 0x7f63bc526a00 - clone3
at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
85: 0x0 - <unknown>
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/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: rustc 1.60.0-nightly (89b9f7b28 2022-01-10) running on x86_64-unknown-linux-gnu
note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type bin
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
end of query stack
thread panicked while panicking. aborting.
error: could not compile `rust-firmware-layout`
Caused by:
process didn't exit successfully: `rustc --crate-name build_script_build --edition=2018 rust-firmware-layout/build.rs --error-format=json --json=diagnostic-rendered-ansi,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=56d899ccc5d36e6b -C extra-filename=-56d899ccc5d36e6b --out-dir /home/dama/Projects/Fiedka/uefi-pi-rs/target/debug/build/rust-firmware-layout-56d899ccc5d36e6b -C incremental=/home/dama/Projects/Fiedka/uefi-pi-rs/target/debug/incremental -L dependency=/home/dama/Projects/Fiedka/uefi-pi-rs/target/debug/deps --extern build_fsp=/home/dama/Projects/Fiedka/uefi-pi-rs/target/debug/deps/libbuild_fsp-c0e9d89860a262a4.rlib --extern json5=/home/dama/Projects/Fiedka/uefi-pi-rs/target/debug/deps/libjson5-b3444482ce300131.rlib --extern scroll=/home/dama/Projects/Fiedka/uefi-pi-rs/target/debug/deps/libscroll-9a2f8de61e4590dd.rlib --extern serde=/home/dama/Projects/Fiedka/uefi-pi-rs/target/debug/deps/libserde-86fa873edda4b6d7.rlib` (signal: 4, SIGILL: illegal instruction)
make: *** [Makefile:19: assemble] Error 101
@orangecms
Copy link
Author

Tried with nightly 2022-09-01, which works - but we'd need to migrate the llvm_asm! things; see also:
rust-lang/rust#70173

Starting RUST Based IPL:
    Boot_fv - 0xFFF00000
    Top of stack - 0x79000
    Temp ram base - 0x0
    Temp ram top - 0x7FF00
    Temp page table base - 0x79000
    Initial eax value - 0xFFFFFE04
Call FspMemoryInit
Switch to stack - 0x7DF00000
Continue function - Hob address - 0x7EF20000
Migrate pagetable @ 0x7E700000
Call TempRamExit
Call FspSiliconInit
Payload is pe image
Migrate hobs @ 0x7E800000
Call payload entry - 0x7DF147A0
Starting UEFI hob - 0x7e800000
PhitHob:
  version                - 0x9
  boot_mode              - 0x0
  efi_memory_top         - 0x000000007f000000
  efi_memory_bottom      - 0x000000007ef00000
  efi_free_memory_top    - 0x000000007efe4000
  efi_free_memory_bottom - 0x000000007ef20dc0
  efi_end_of_hob_list    - 0x000000007e800e60
Hob:
  header.type            - 0x7
  header.length          - 0x28
Hob:
  header.type            - 0x7
  header.length          - 0x108
Hob:
  header.type            - 0x7
  header.length          - 0x108
Hob:
  header.type            - 0x7
  header.length          - 0x88
Hob:
  header.type            - 0x7
  header.length          - 0x88
Hob:
  header.type            - 0x7
  header.length          - 0x208
Hob:
  header.type            - 0x7
  header.length          - 0x10
Hob:
  header.type            - 0x7
  header.length          - 0x10
Hob:
  header.type            - 0x4
  header.length          - 0xe0
Hob:
  header.type            - 0x4
  header.length          - 0xb8
ResourceDescription 0x00000000 : 0x0000000000000000 - 0x000000000009ffff (0x00003c07)
ResourceDescription 0x00000005 : 0x00000000000a0000 - 0x00000000000fffff (0x00003c07)
ResourceDescription 0x00000000 : 0x0000000000100000 - 0x000000007eefffff (0x00003c07)
ResourceDescription 0x00000005 : 0x000000007ef00000 - 0x000000007effffff (0x00003c07)
ResourceDescription 0x00000000 : 0x0000000100000000 - 0x000000017fffffff (0x00003c03)
ResourceDescription 0x00000005 : 0x000000007f000000 - 0x000000007fffffff (0x00003c07)
MemoryAllocation 0x00000004 : 0x000000007ef00000 - 0x000000007ef1ffff
MemoryAllocation 0x00000003 : 0x000000007effa000 - 0x000000007effffff
Cpu : mem size 40 , io size 16
MemoryAllocation 0x00000004 : 0x000000007eff9000 - 0x000000007eff9fff
Hob:
  header.type            - 0x7
  header.length          - 0x28
Hob:
  header.type            - 0x7
  header.length          - 0x18
Hob:
  header.type            - 0x7
  header.length          - 0x10
Hob:
  header.type            - 0x7
  header.length          - 0x18
MemoryAllocation 0x00000003 : 0x000000007eff6000 - 0x000000007eff8fff
Hob:
  header.type            - 0x4
  header.length          - 0x1b0
MemoryAllocation 0x00000004 : 0x000000007eff2000 - 0x000000007eff5fff
MemoryAllocation 0x00000004 : 0x000000007eff1000 - 0x000000007eff1fff
MemoryAllocation 0x00000003 : 0x000000007eff0000 - 0x000000007eff0fff
MemoryAllocation 0x00000004 : 0x000000007efec000 - 0x000000007efeffff
MemoryAllocation 0x00000004 : 0x000000007efeb000 - 0x000000007efebfff
MemoryAllocation 0x00000003 : 0x000000007efea000 - 0x000000007efeafff
MemoryAllocation 0x00000004 : 0x000000007efe6000 - 0x000000007efe9fff
MemoryAllocation 0x00000004 : 0x000000007efe5000 - 0x000000007efe5fff
MemoryAllocation 0x00000003 : 0x000000007efe4000 - 0x000000007efe4fff
Hob:
  header.type            - 0x4
  header.length          - 0xc0
MemoryAllocation 0x00000004 : 0x000000007e700000 - 0x000000007e7fffff
MemoryAllocation 0x00000003 : 0x000000007df00000 - 0x000000007e17ffff
MemoryAllocation 0x00000004 : 0x000000007d700000 - 0x000000007defffff
FirmwareVolume : 0x00000000ffc00000 - 0x00000000ffffffff
add_initial_allocation 7 : 0x0000000000000000-0x000000000009ffff
add_initial_allocation 7 : 0x0000000000100000-0x000000007eefffff
add_initial_allocation 7 : 0x0000000100000000-0x000000017fffffff
rust-uefi-payload/src/efi/alloc.rs:234 out of resource
rust-uefi-payload/src/efi/alloc.rs:234 out of resource
rust-uefi-payload/src/efi/alloc.rs:234 out of resource
rust-uefi-payload/src/efi/alloc.rs:234 out of resource
rust-uefi-payload/src/efi/alloc.rs:234 out of resource
rust-uefi-payload/src/efi/alloc.rs:234 out of resource
rust-uefi-payload/src/efi/alloc.rs:234 out of resource
rust-uefi-payload/src/efi/alloc.rs:234 out of resource
rust-uefi-payload/src/efi/alloc.rs:234 out of resource
rust-uefi-payload/src/efi/alloc.rs:234 out of resource
rust-uefi-payload/src/efi/alloc.rs:234 out of resource
rust-uefi-payload/src/efi/alloc.rs:234 out of resource
rust-uefi-payload/src/efi/alloc.rs:234 out of resource
EFI_STUB: install_protocol_interface: Guid { time_low: [193, 119, 116, 56], time_mid: [199, 105], time_hi_and_version: [210, 17], clk_seq_hi_res: 142, clk_seq_low: 57, node: [0, 160, 201, 105, 114, 59] }, handle: 0x0, interface: 0x7df1c000 - new_handle: 0x7e11c480 status: Status(0)
EFI_STUB: install_protocol_interface: Guid { time_low: [52, 117, 158, 221], time_mid: [98, 119], time_hi_and_version: [152, 70], clk_seq_hi_res: 140, clk_seq_low: 20, node: [245, 133, 23, 166, 37, 170] }, handle: 0x7e11c480, interface: 0x7df1c018 - new_handle: 0x7e11c480 status: Status(0)
EFI_STUB: install_protocol_interface: Guid { time_low: [194, 119, 116, 56], time_mid: [199, 105], time_hi_and_version: [210, 17], clk_seq_hi_res: 142, clk_seq_low: 57, node: [0, 160, 201, 105, 114, 59] }, handle: 0x0, interface: 0x7df1c048 - new_handle: 0x7e11c610 status: Status(0)
EFI_STUB: install_protocol_interface: Guid { time_low: [194, 119, 116, 56], time_mid: [199, 105], time_hi_and_version: [210, 17], clk_seq_hi_res: 142, clk_seq_low: 57, node: [0, 160, 201, 105, 114, 59] }, handle: 0x0, interface: 0x7df1c048 - new_handle: 0x7e11c7a0 status: Status(0)
Found PCI device vendor=8086 device=29c0 in slot=0
Found PCI device vendor=8086 device=2918 in slot=31
Core Init Done
QEMU: Terminated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment