From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbwRb-0004Lm-3U for qemu-devel@nongnu.org; Fri, 23 Nov 2012 11:49:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TbwRa-0000cv-4p for qemu-devel@nongnu.org; Fri, 23 Nov 2012 11:49:35 -0500 Received: from cantor2.suse.de ([195.135.220.15]:53011 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbwRZ-0000co-Un for qemu-devel@nongnu.org; Fri, 23 Nov 2012 11:49:34 -0500 Message-ID: <50AFA91C.1020701@suse.de> Date: Fri, 23 Nov 2012 17:49:32 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1353660436-8897-1-git-send-email-pbonzini@redhat.com> <1353660436-8897-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1353660436-8897-2-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1.3 1/5] qom: fix refcount of non-heap-allocated objects List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: peter.maydell@linaro.org, aliguori@us.ibm.com, qemu-devel@nongnu.org, Liu Ping Fan Am 23.11.2012 09:47, schrieb Paolo Bonzini: > The reference count for embedded objects is always one too low, because > object_initialize_with_type returns with zero references to the object. > This causes premature finalization of the object (or an assertion failu= re) > after calling object_ref to add an extra reference and object_unref to > remove it. >=20 > The fix is to move the initial object_ref call from object_new_with_typ= e > to object_initialize_with_type. >=20 > Signed-off-by: Paolo Bonzini Acked-by: Andreas F=E4rber Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg