From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36244) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bn1mW-0005i6-BK for qemu-devel@nongnu.org; Thu, 22 Sep 2016 07:03:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bn1mP-0006zG-E7 for qemu-devel@nongnu.org; Thu, 22 Sep 2016 07:03:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41008) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bn1mP-0006z1-7c for qemu-devel@nongnu.org; Thu, 22 Sep 2016 07:03:01 -0400 From: Markus Armbruster References: <20160921103629.6410-1-marcandre.lureau@redhat.com> <20160921103629.6410-2-marcandre.lureau@redhat.com> <87bmzhz5jx.fsf@dusky.pond.sub.org> <1730633132.491556.1474474072544.JavaMail.zimbra@redhat.com> Date: Thu, 22 Sep 2016 13:02:57 +0200 In-Reply-To: <1730633132.491556.1474474072544.JavaMail.zimbra@redhat.com> (=?utf-8?Q?=22Marc-Andr=C3=A9?= Lureau"'s message of "Wed, 21 Sep 2016 12:07:52 -0400 (EDT)") Message-ID: <87twd8mc2m.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/3] qapi: return a 'missing parameter' error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?Q?Marc-Andr=C3=A9?= Lureau Cc: =?utf-8?Q?Marc-Andr=C3=A9?= Lureau , berto@igalia.com, qemu-devel@nongnu.org, Eric Blake Marc-Andr=C3=A9 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 =3D NULL, which seems ve= ry >> likely to crash QEMU. Let me try... yup: >>=20 >> { "execute": "object-add", >> "arguments": { "qom-type": "memory-backend-file", "id": "foo" } } >>=20 >> Kills QEMU with "qemu/qom/object_interfaces.c:115: user_creatable_add_ty= pe: >> Assertion `qdict' failed." >>=20 >> Either fix this in a separate patch before this one, or cover it in this >> one's commit message. Your choice. >>=20 >> A separate patch might be usable for qemu-stable. > > It looks to me that this is a different bug.=20 > > visit_type_q_obj_object_add_arg_members() doesn't call visit_type_any() i= f "props" is missing (it's optionnal). > > And arg is zero'ed in qmp-marshal, and the assert() was added in ad739706= bbadee49. I am trying to fix that regression. Okay, that's *also* a bug. For the bug I spotted, try { "execute": "qom-set", "arguments": { "path": "/machine", "property": "rtc-time" } } Trips assert(!err !=3D !*obj) in its caller visit_type_any(). [...]