From mboxrd@z Thu Jan 1 00:00:00 1970 From: Consul Subject: Re: qcow2 corruption observed, fixed by reverting old change Date: Thu, 12 Feb 2009 14:57:12 -0800 Message-ID: References: <20090211070049.GA27821@shareable.org> <4992A108.8070304@suse.de> <20090211114126.GC31997@shareable.org> <4992C77D.4030104@suse.de> <20090211164814.GA7161@shareable.org> Reply-To: qemu-devel@nongnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: qemu-devel@nongnu.org Return-path: In-Reply-To: <20090211164814.GA7161@shareable.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org List-Id: kvm.vger.kernel.org Jamie Lokier wrote: > > It was just for clarity. If there are any bugs it's more likely to be > truncation on a 32 bit host :-) > Maybe not a proper fix, do you see the same "corruption" with this patch? I don't know if it causes any memory leaks, but it certainly clears the segfaults while running my old qcow2 windows images. Perhaps this is a wrong place to free() or it needs a condition? $ svn diff block.c Index: block.c =================================================================== --- block.c (revision 6618) +++ block.c (working copy) @@ -1263,7 +1263,7 @@ if (!s->is_write) { qemu_iovec_from_buffer(s->iov, s->bounce, s->iov->size); } - qemu_free(s->bounce); + //qemu_free(s->bounce); s->this_aiocb->cb(s->this_aiocb->opaque, ret); qemu_aio_release(s->this_aiocb); }