qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bad error handling in machine sifive-u


From: Markus Armbruster
Subject: Bad error handling in machine sifive-u
Date: Mon, 06 Dec 2021 13:53:45 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Watch this:

    $ ../qemu/bld/qemu-system-riscv64 -M sifive_u -S -monitor stdio -display 
none -drive if=pflash
    QEMU 6.1.93 monitor - type 'help' for more information
    (qemu) Unexpected error in sifive_u_otp_realize() at 
../hw/misc/sifive_u_otp.c:229:
    qemu-system-riscv64: OTP drive size < 16K
    Aborted (core dumped)

sifive_u_machine_init() calls

    qdev_realize(DEVICE(&s->soc), NULL, &error_abort);

My reproducer demonstrates that passing &error_abort is wrong: this
realize can fail.

&error_fatal should do here.

Please check the other uses of &error_abort in this machine for similar
misuse.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]