qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 for-2.8 0/4] Fix MacOS runtime failure of qob


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v2 for-2.8 0/4] Fix MacOS runtime failure of qobject_from_jsonf()
Date: Tue, 29 Nov 2016 10:33:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

address@hidden writes:

> Hi,
>
> Your series failed automatic build test. Please find the testing commands and
> their output below. If you have docker installed, you can probably reproduce 
> it
> locally.
>
> Subject: [Qemu-devel] [PATCH v2 for-2.8 0/4] Fix MacOS runtime failure of 
> qobject_from_jsonf()
> Type: series
> Message-id: address@hidden
[...]
> /tmp/qemu-test/src/qobject/json-parser.c: In function 'parse_escape':
> /tmp/qemu-test/src/qobject/json-parser.c:480:1: error: control reaches end of 
> non-void function [-Werror=return-type]
>  }
>  ^

This is due to PATCH RFC 4/4.  In addition to dropping unused conversion
specifiers, it silently converts a failure into an assertion:
parse_escape() running into an invalid conversion specifer.

Before, it fails without storing an error in ctxt->err.  Its caller
parse_value() also fails.  Its callers then store an error on failure,
with parse_error().  Except for json_parser_parse_err().  When
json_parser_parse_err() can fail with or without setting an error.
Awkward, but its callers cope with that.

After, parse_escape() executes assert(false).  Patchew's compiler
appears to be too stupid to see that control cannot reach the end of the
function then.  This is surprising.

I haven't checked whether more failures without error remain.  If no,
callers should be simplified.

In any case, the change of how we handle invalid conversion specifiers
should be its own patch.

[...]



reply via email to

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