On 4/5/19 1:40 PM, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilb...@redhat.com>
> 
> The test uses the trick:
>    if (!opts) {
>      opts = &(QOSGraph...Options) { };
>    }
> 
>   in a couple of places, however the temporary created
> by the &() {}  goes out of scope at the bottom of the if,
> and results in a seg or assert when opts-> fields are
> used (on fedora 30's gcc 9).
> 
> Fixes: fc281c802022cb3a73a5
> Signed-off-by: Dr. David Alan Gilbert <dgilb...@redhat.com>
> ---
>  tests/libqos/qgraph.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)

Fixing it for 4.0 would be nice (we can't promise that everything in 4.0
is clean for gcc 9, but as long as we have to do -rc3 anyways, fixing
undefined behavior into something well-defined like this seems reasonable)

Reviewed-by: Eric Blake <ebl...@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to