From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:38517) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwnzL-0000T8-WF for qemu-devel@nongnu.org; Sun, 12 Feb 2012 23:58:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RwnzK-0006R9-Rx for qemu-devel@nongnu.org; Sun, 12 Feb 2012 23:58:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:1025) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwnzK-0006R3-Cj for qemu-devel@nongnu.org; Sun, 12 Feb 2012 23:58:06 -0500 Date: Mon, 13 Feb 2012 06:58:08 +0200 From: "Michael S. Tsirkin" Message-ID: <20120213045807.GA22676@redhat.com> References: <20120212170743.GA3375@redhat.com> <20120212173140.GB3375@redhat.com> <4F37F910.5030400@codemonkey.ws> <20120212175659.GA4199@redhat.com> <4F381B4D.2000108@codemonkey.ws> <20120212201547.GC4199@redhat.com> <4F381EC7.3030407@codemonkey.ws> <20120213001735.GA8269@redhat.com> <20120213011813.GA8482@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120213011813.GA8482@redhat.com> Subject: Re: [Qemu-devel] weird qdev error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org On Mon, Feb 13, 2012 at 03:18:13AM +0200, Michael S. Tsirkin wrote: > > I also see this: > > > > device_add virtio-net-pci,netdev=foo,mac=52:54:00:12:34:56,id=bla > > device_del bla > > *** glibc detected *** /home/mst/qemu-test/bin/qemu-system-x86_64: > > corrupted double-linked list: 0x00007fae434565a0 *** > > > > Am I alone? Doesn't solve this issue, but shouldn't we use _SAFE in object_property_del_child? Like this: ---> qemu: use safe list macro As we might remove an element from list, use the safe macro to walk it. Signed-off-by: Michael S. Tsirkin --- diff --git a/qom/object.c b/qom/object.c index 5e5b261..8b64fb6 100644 --- a/qom/object.c +++ b/qom/object.c @@ -299,9 +299,9 @@ static void object_property_del_all(Object *obj) static void object_property_del_child(Object *obj, Object *child, Error **errp) { - ObjectProperty *prop; + ObjectProperty *prop, *next; - QTAILQ_FOREACH(prop, &obj->properties, node) { + QTAILQ_FOREACH_SAFE(prop, &obj->properties, node, next) { if (!strstart(prop->type, "child<", NULL)) { continue; }