[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] qapi: Fix crash on redefinition with a different condition
From: |
Eric Blake |
Subject: |
Re: [PATCH] qapi: Fix crash on redefinition with a different condition |
Date: |
Fri, 6 Aug 2021 16:09:02 -0500 |
User-agent: |
NeoMutt/20210205-687-0ed190 |
On Fri, Aug 06, 2021 at 02:05:10PM +0200, Markus Armbruster wrote:
> QAPISchema._make_implicit_object_type() asserts that when an implicit
> object type is used multiple times, @ifcond is the same for all uses.
> It will be for legitimate uses, i.e. simple union branch wrapper
> types. A comment explains this.
>
> The assertion fails when a command or event is redefined with a
> different condition. The redefinition is an error, but it's flagged
> only later.
>
> Fixing the assertion would complicate matters further. Not
> worthwhile, drop it instead. We really need to get rid of simple
> unions.
>
> Tweak test case redefined-event to cover redefinition with a different
> condition.
>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
6.2 material (this corner case doesn't fire in our 6.1 code base, and
really only matters for developers adding new interfaces which won't
happen in 6.1).
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org