Description
Known versions
The bug can be reproduced with version 0.19.0
and 0.20.0
. While 0.18.1
is functioning.
Bug behavior
Panicked with
panicked at .cargo/registry/src/index.crates.io-6f17d22bba15001f/multiboot2-0.19.0/src/memory_map.rs:335:9:
assertion `left == right` failed
left: 24
right: 0
at
multiboot2/multiboot2/src/memory_map.rs
Lines 328 to 337 in 3077c3b
Context
I used let mb2_info = BootInformation::load(addr)
to load the header, and try to debug print it with "{:#?}", mb2_info
.
The following information is printed:
Multiboot2BootInformation {
start_address: 589824,
end_address: 599200,
total_size: 9376,
basic_memory_info: Some(
BasicMemoryInfoTag {
typ: BasicMeminfo,
size: 16,
memory_lower: 640,
memory_upper: 7168,
},
),
boot_loader_name: Some(
BootLoaderNameTag {
typ: BootLoaderName,
size: 18,
name: Ok(
"GRUB 2.12",
),
},
),
command_line: Some(
CommandLineTag {
typ: Cmdline,
size: 104,
cmdline: Ok(
"SHELL=/bin/sh LOGNAME=root HOME=/ USER=root PATH=/bin:/benchmark init=/usr/bin/busybox -- sh -l",
),
},
),
efi_bs_not_exited: None,
And it stops printing with a panic here.
Environment
- OVMF built with EDK2 version
edk2-stable202402
; - QEMU built from source version
8.2.1
.
I don't have time build a minimal reproduction demo. But one can do it under our kernel project https://github.com/asterinas/asterinas. There's a development image for the exact environment https://hub.docker.com/r/asterinas/asterinas.
Plans to fix it
We may use 0.18.1
for our project currently. I am happy to provide assistance for anyone taking it. I can also take it but I need guidance.