Re: [Qemu-devel] [PATCH 1/3] qapi: return a 'missing parameter' error

2016-09-22 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > - Original Message - >> Aha, we got a different bug fix! The old code fails to fail when the >> parameter doesn't exist. Instead, it sets *obj = NULL, which seems very >> likely to crash QEMU. Let me try... yup: >> >> { "execute": "object-add", >

Re: [Qemu-devel] [PATCH 1/3] qapi: return a 'missing parameter' error

2016-09-21 Thread Marc-André Lureau
Hi - Original Message - > Aha, we got a different bug fix! The old code fails to fail when the > parameter doesn't exist. Instead, it sets *obj = NULL, which seems very > likely to crash QEMU. Let me try... yup: > > { "execute": "object-add", > "arguments": { "qom-type": "mem

Re: [Qemu-devel] [PATCH 1/3] qapi: return a 'missing parameter' error

2016-09-21 Thread Marc-André Lureau
Hi - Original Message - > Marc-André Lureau writes: > > > The 'old' dispatch code returned a QERR_MISSING_PARAMETER for missing > > parameters, but the qapi qmp_dispatch() code uses > > QERR_INVALID_PARAMETER_TYPE. > > > > Improve qapi code to return QERR_INVALID_PARAMETER_TYPE where > >

Re: [Qemu-devel] [PATCH 1/3] qapi: return a 'missing parameter' error

2016-09-21 Thread Markus Armbruster
Marc-André Lureau writes: > The 'old' dispatch code returned a QERR_MISSING_PARAMETER for missing > parameters, but the qapi qmp_dispatch() code uses > QERR_INVALID_PARAMETER_TYPE. > > Improve qapi code to return QERR_INVALID_PARAMETER_TYPE where > appropriate. > > Signed-off-by: Marc-André Lurea

Re: [Qemu-devel] [PATCH 1/3] qapi: return a 'missing parameter' error

2016-09-21 Thread Alberto Garcia
On Wed 21 Sep 2016 12:36:27 PM CEST, Marc-André Lureau wrote: > The 'old' dispatch code returned a QERR_MISSING_PARAMETER for missing > parameters, but the qapi qmp_dispatch() code uses > QERR_INVALID_PARAMETER_TYPE. > > Improve qapi code to return QERR_INVALID_PARAMETER_TYPE where > appropriate. >

[Qemu-devel] [PATCH 1/3] qapi: return a 'missing parameter' error

2016-09-21 Thread Marc-André Lureau
The 'old' dispatch code returned a QERR_MISSING_PARAMETER for missing parameters, but the qapi qmp_dispatch() code uses QERR_INVALID_PARAMETER_TYPE. Improve qapi code to return QERR_INVALID_PARAMETER_TYPE where appropriate. Signed-off-by: Marc-André Lureau --- qapi/qmp-input-visitor.c | 109 +++