qemu-devel
[Top][All Lists]
Advanced

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

Re: Bad error handling in machine sifive-u


From: Alistair Francis
Subject: Re: Bad error handling in machine sifive-u
Date: Tue, 7 Dec 2021 22:16:41 +1000

On Mon, Dec 6, 2021 at 11:15 PM Markus Armbruster <armbru@redhat.com> wrote:
>
> 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.

Thanks for pointing this out. I'll work on a patch to fix this up.

Alistair

>
> 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]