Skip to content

index out of bounds on the example given #174

@tommythorn

Description

@tommythorn

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions