Closed
Description
Code
I do not exactly know where the error is from but I am pretty sure its from here:
extern crate rlibc;
extern crate alloc; // Happens here pretty sure...
Using the following features:
#![no_std]
#![no_main]
#![feature(asm, abi_efiapi, custom_test_frameworks)]
#![test_runner(aero_boot::test_runner)]
Dependencies:
log = { version = "0.4.14", default-features = false }
uefi = "0.8.0"
xmas-elf = "0.7.0"
rlibc = "1"
uefi-services = "0.5.0"
Minimal Repro:
#![no_std]
#![no_main]
#![feature(asm, abi_efiap)i]
extern crate rlibc;
extern crate alloc;
use uefi::prelude::*;
#[entry]
fn efi_main(image: Handle, system_table: SystemTable<Boot>) -> Status {
uefi_services::init(&system_table).expect_success("Failed to initialize utils");
loop {}
}
Meta
rustc --version --verbose
:
rustc 1.53.0-nightly (07e0e2ec2 2021-03-24)
binary: rustc
commit-hash: 07e0e2ec268c140e607e1ac7f49f145612d0f597
commit-date: 2021-03-24
host: x86_64-pc-windows-msvc
release: 1.53.0-nightly
LLVM version: 12.0.0
Error output
thread 'rustc' panicked at 'found unstable fingerprints for exported_symbols(aero_boot[fb01]): [(NoDefId(__rust_alloc), Rust), (NoDefId(__rust_alloc_zeroed), Rust), (NoDefId(__rust_dealloc), Rust), (NoDefId(__rust_realloc), Rust), (NonGeneric(DefId(0:63 ~ aero_boot[fb01]::efi_main)), C)]', /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597\compiler\rustc_query_system\src\query\plumbing.rs:593:5note: 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.53.0-nightly (07e0e2ec2 2021-03-24) running on x86_64-pc-windows-msvc
note: compiler flags: -Z unstable-options -C opt-level=3 -C panic=abort -C lto -C debuginfo=2 -C debug-assertions=on -C incremental --crate-type bin
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
#0 [exported_symbols] exported_symbols
end of query stack
Backtrace
Fresh core v0.0.0 (C:\Users\user\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core)
Fresh unicode-xid v0.2.1
Fresh rustc-std-workspace-core v1.99.0 (C:\Users\user\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\rustc-std-workspace-core)
Fresh compiler_builtins v0.1.39
Fresh proc-macro2 v1.0.26
Fresh alloc v0.0.0 (C:\Users\user\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\alloc)
Fresh quote v1.0.9
Fresh bit_field v0.10.1
Fresh bitflags v1.2.1
Fresh syn v1.0.69
Fresh cfg-if v1.0.0
Fresh bit_field v0.9.0
Fresh zero v0.1.2
Fresh rlibc v1.0.0
Fresh ucs2 v0.3.2
Fresh log v0.4.14
Fresh uefi-macros v0.3.3
Fresh x86_64 v0.13.5
Fresh xmas-elf v0.7.0
Fresh uefi v0.8.0
Fresh uefi-services v0.5.0
Compiling aero_boot v0.1.0 (H:\Andy\Rust\aero\aero_boot)
Running `rustc --crate-name aero_boot --edition=2018 aero_boot\src\main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -C panic=abort -C lto -C debuginfo=2 -C debug-assertions=on -C metadata=e9c4743ffefcc03c -C extra-filename=-e9c4743ffefcc03c --out-dir H:\Andy\Rust\aero\target\x86_64-unknown-uefi\debug\deps --target x86_64-unknown-uefi -C incremental=H:\Andy\Rust\aero\target\x86_64-unknown-uefi\debug\incremental -L dependency=H:\Andy\Rust\aero\target\x86_64-unknown-uefi\debug\deps -L dependency=H:\Andy\Rust\aero\target\debug\deps --extern aero_boot=H:\Andy\Rust\aero\target\x86_64-unknown-uefi\debug\deps\libaero_boot-041cb45ae5f6bae5.rlib --extern noprelude:alloc=H:\Andy\Rust\aero\target\x86_64-unknown-uefi\debug\deps\liballoc-d5536d1ffa2bb4f1.rlib --extern noprelude:compiler_builtins=H:\Andy\Rust\aero\target\x86_64-unknown-uefi\debug\deps\libcompiler_builtins-e0a12bf37a187317.rlib --extern noprelude:core=H:\Andy\Rust\aero\target\x86_64-unknown-uefi\debug\deps\libcore-0a44a11c86944628.rlib --extern log=H:\Andy\Rust\aero\target\x86_64-unknown-uefi\debug\deps\liblog-37ea66b9fb32562e.rlib --extern rlibc=H:\Andy\Rust\aero\target\x86_64-unknown-uefi\debug\deps\librlibc-60a957f0f9521c98.rlib --extern uefi=H:\Andy\Rust\aero\target\x86_64-unknown-uefi\debug\deps\libuefi-0b4984efdc323820.rlib --extern uefi_services=H:\Andy\Rust\aero\target\x86_64-unknown-uefi\debug\deps\libuefi_services-e3c1ed061a7e87c6.rlib --extern x86_64=H:\Andy\Rust\aero\target\x86_64-unknown-uefi\debug\deps\libx86_64-9c6d355588930c82.rlib --extern xmas_elf=H:\Andy\Rust\aero\target\x86_64-unknown-uefi\debug\deps\libxmas_elf-5bd5119a840c11f1.rlib -Z unstable-options`
warning: unused variable: `start`
--> aero_boot\src\main.rs:184:21
|
184 | let start = header.offset();
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_start`
|
= note: `#[warn(unused_variables)]` on by default
warning: unused variable: `end`
--> aero_boot\src\main.rs:185:21
|
185 | let end = header.offset() + header.file_size();
| ^^^ help: if this is intentional, prefix it with an underscore: `_end`
warning: unused variable: `mmap_buffer`
--> aero_boot\src\main.rs:230:9
|
230 | let mmap_buffer = unsafe { core::slice::from_raw_parts_mut(buffer_ptr, buffer_size) };
| ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_mmap_buffer`
thread 'rustc' panicked at 'found unstable fingerprints for exported_symbols(aero_boot[fb01]): [(NoDefId(__rust_alloc), Rust), (NoDefId(__rust_alloc_zeroed), Rust), (NoDefId(__rust_dealloc), Rust), (NoDefId(__rust_realloc), Rust), (NonGeneric(DefId(0:63 ~ aero_boot[fb01]::efi_main)), C)]', /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597\compiler\rustc_query_system\src\query\plumbing.rs:593:5note: 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.53.0-nightly (07e0e2ec2 2021-03-24) running on x86_64-pc-windows-msvc
note: compiler flags: -Z unstable-options -C opt-level=3 -C panic=abort -C lto -C debuginfo=2 -C debug-assertions=on -C incremental --crate-type bin
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
#0 [exported_symbols] exported_symbols
end of query stack
warning: 3 warnings emitted
error: could not compile `aero_boot`
Caused by:
process didn't exit successfully: `rustc --crate-name aero_boot --edition=2018 aero_boot\src\main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -C panic=abort -C lto -C debuginfo=2 -C debug-assertions=on -C metadata=e9c4743ffefcc03c -C extra-filename=-e9c4743ffefcc03c --out-dir H:\Andy\Rust\aero\target\x86_64-unknown-uefi\debug\deps --target x86_64-unknown-uefi -C incremental=H:\Andy\Rust\aero\target\x86_64-unknown-uefi\debug\incremental -L dependency=H:\Andy\Rust\aero\target\x86_64-unknown-uefi\debug\deps -L dependency=H:\Andy\Rust\aero\target\debug\deps --extern aero_boot=H:\Andy\Rust\aero\target\x86_64-unknown-uefi\debug\deps\libaero_boot-041cb45ae5f6bae5.rlib --extern noprelude:alloc=H:\Andy\Rust\aero\target\x86_64-unknown-uefi\debug\deps\liballoc-d5536d1ffa2bb4f1.rlib --extern noprelude:compiler_builtins=H:\Andy\Rust\aero\target\x86_64-unknown-uefi\debug\deps\libcompiler_builtins-e0a12bf37a187317.rlib --extern noprelude:core=H:\Andy\Rust\aero\target\x86_64-unknown-uefi\debug\deps\libcore-0a44a11c86944628.rlib --extern log=H:\Andy\Rust\aero\target\x86_64-unknown-uefi\debug\deps\liblog-37ea66b9fb32562e.rlib --extern rlibc=H:\Andy\Rust\aero\target\x86_64-unknown-uefi\debug\deps\librlibc-60a957f0f9521c98.rlib --extern uefi=H:\Andy\Rust\aero\target\x86_64-unknown-uefi\debug\deps\libuefi-0b4984efdc323820.rlib --extern uefi_services=H:\Andy\Rust\aero\target\x86_64-unknown-uefi\debug\deps\libuefi_services-e3c1ed061a7e87c6.rlib --extern x86_64=H:\Andy\Rust\aero\target\x86_64-unknown-uefi\debug\deps\libx86_64-9c6d355588930c82.rlib --extern xmas_elf=H:\Andy\Rust\aero\target\x86_64-unknown-uefi\debug\deps\libxmas_elf-5bd5119a840c11f1.rlib -Z unstable-options` (exit code: 101)