From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52784) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKKdg-0003pf-6y for qemu-devel@nongnu.org; Tue, 05 Jul 2016 03:19:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bKKdb-0006QF-4f for qemu-devel@nongnu.org; Tue, 05 Jul 2016 03:19:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41800) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKKda-0006Q9-VY for qemu-devel@nongnu.org; Tue, 05 Jul 2016 03:19:19 -0400 Date: Tue, 5 Jul 2016 15:19:16 +0800 From: Fam Zheng Message-ID: <20160705071916.GC29307@ad.usersys.redhat.com> References: <1467636059-12557-1-git-send-email-pbonzini@redhat.com> <20160705065635.GA29307@ad.usersys.redhat.com> <577B5EC2.40709@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <577B5EC2.40709@cn.fujitsu.com> Subject: Re: [Qemu-devel] [PATCH] json-streamer: fix double-free on exiting during a parse List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Changlong Xie Cc: Paolo Bonzini , qemu-devel@nongnu.org, armbru@redhat.com On Tue, 07/05 15:16, Changlong Xie wrote: > On 07/05/2016 02:56 PM, Fam Zheng wrote: > > On Mon, 07/04 14:40, Paolo Bonzini wrote: > > > Now that json-streamer tries not to leak tokens on incomplete parse, > > > the tokens can be freed twice if QEMU destroys the json-streamer > > > object during the parser->emit call. To fix this, create the new > > > empty GQueue earlier, so that it is already in place when the old > > > one is passed to parser->emit. > > > > > > Reported-by: Changlong Xie > > > Signed-off-by: Paolo Bonzini > > > > Two meta questions: > > > > Is there a reproducer and/or test case coverage? > > tests/qemu-iotests/071 > > > > > Does qemu-stable need this? > > > > http://lists.nongnu.org/archive/html/qemu-devel/2016-07/msg00465.html Get it! Thanks! Fam