From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:39112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2mag-0005pB-Os for qemu-devel@nongnu.org; Wed, 29 Feb 2012 11:41:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2maa-00055t-AO for qemu-devel@nongnu.org; Wed, 29 Feb 2012 11:41:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:1027) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2maa-00055k-1d for qemu-devel@nongnu.org; Wed, 29 Feb 2012 11:41:16 -0500 Message-ID: <4F4E5526.4010604@redhat.com> Date: Wed, 29 Feb 2012 18:41:10 +0200 From: Avi Kivity MIME-Version: 1.0 References: <20120229161630.GB8661@redhat.com> <4F4E4FCF.1010601@codemonkey.ws> <4F4E53FA.3090407@redhat.com> <20120229163925.GF8661@redhat.com> In-Reply-To: <20120229163925.GF8661@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] port io mem leak List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org, Anthony Liguori On 02/29/2012 06:39 PM, Michael S. Tsirkin wrote: > On Wed, Feb 29, 2012 at 06:36:10PM +0200, Avi Kivity wrote: > > On 02/29/2012 06:18 PM, Anthony Liguori wrote: > > > On 02/29/2012 10:16 AM, Michael S. Tsirkin wrote: > > >> Valgrind shows a memory leak below: > > > > > > Is this with Avi's latest branch or is this in qemu.git? > > > > Looks like qemu.git. > > This is a merge of your for-mst and my bridge patches. > Take a look at 'valgrind' branch on my github tree > if you like: > The bug is present in qemu.git, my patches don't touch it: void isa_register_portio_list(ISADevice *dev, uint16_t start, const MemoryRegionPortio *pio_start, void *opaque, const char *name) { PortioList *piolist = g_new(PortioList, 1); ^ leaked /* START is how we should treat DEV, regardless of the actual contents of the portio array. This is how the old code actually handled e.g. the FDC device. */ isa_init_ioport(dev, start); portio_list_init(piolist, pio_start, opaque, name); portio_list_add(piolist, isabus->address_space_io, start); } It's only a problem if we allow unplug, which we shouldn't for these devices. -- error compiling committee.c: too many arguments to function