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

index out of bounds on the example given #174

Open
tommythorn opened this issue Jun 3, 2024 · 0 comments
Open

index out of bounds on the example given #174

tommythorn opened this issue Jun 3, 2024 · 0 comments

Comments

@tommythorn
Copy link

I cloned riscv-rust (8ee69d7) and tried to run the demo (cd riscv-rust/cli; cargo run --release ../resources/linux/opensbi/fw_payload.elf), but alas, it fails quickly with

thread 'main' panicked at src/device/virtio_block_disk.rs:309:71:
                                                                 index out of bounds: the len is 0 but the index is 0

FWIW, the backtrace is

2: core::panicking::panic_bounds_check
                                                                                                                 3: riscv_emu_rust::device::virtio_block_disk::VirtioBlockDisk::tick
                                                               4: riscv_emu_rust::cpu::Cpu::tick
                                                                                                   5: riscv_emu_rust::Emulator::run
              6: riscv_emu_rust_cli::main

Presumably this is a regression?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant