Received: from eggs.gnu.org ([2001:4830:134:3::10]:51472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brgvc-0008Ev-Qa for qemu-devel@nongnu.org; Wed, 05 Oct 2016 03:47:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1brgva-0004g4-SJ for qemu-devel@nongnu.org; Wed, 05 Oct 2016 03:47:47 -0400 From: Markus Armbruster References: <20160922203927.28241-1-marcandre.lureau@redhat.com> <20160922203927.28241-2-marcandre.lureau@redhat.com> Date: Wed, 05 Oct 2016 09:47:42 +0200 In-Reply-To: <20160922203927.28241-2-marcandre.lureau@redhat.com> (=?utf-8?Q?=22Marc-Andr=C3=A9?= Lureau"'s message of "Fri, 23 Sep 2016 00:39:25 +0400") Message-ID: <878tu31bkx.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 v4 1/3] qmp: fix object-add assert() without props List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?Q?Marc-Andr=C3=A9?= Lureau Cc: qemu-devel@nongnu.org, paolo.bonzini@gmail.com, qemu-stable@nongnu.org Marc-Andr=C3=A9 Lureau writes: > Since commit ad739706bbadee49, user_creatable_add_type() expects to be > given a qdict. However, if object-add is called without props, you reach > the assert: "qemu/qom/object_interfaces.c:115: user_creatable_add_type: > Assertion `qdict' failed.", because the qdict isn't created in this > case (it's optional). > > Furthermore, qmp_input_visitor_new() is not meant to be called without a > dict, and a further commit will assert in this situation. > > If none given, create an empty qdict in qmp to avoid the > user_creatable_add_type() assert(qdict). > > Signed-off-by: Marc-Andr=C3=A9 Lureau > Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster