From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42162) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOBy5-0003PZ-U5 for qemu-devel@nongnu.org; Thu, 13 Mar 2014 16:11:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WOBy0-0005uS-2q for qemu-devel@nongnu.org; Thu, 13 Mar 2014 16:11:05 -0400 Received: from cantor2.suse.de ([195.135.220.15]:38663 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOBxz-0005u7-SY for qemu-devel@nongnu.org; Thu, 13 Mar 2014 16:11:00 -0400 Message-ID: <532210D0.2020908@suse.de> Date: Thu, 13 Mar 2014 21:10:56 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1394703694-3281-1-git-send-email-stefanha@redhat.com> <1394703694-3281-3-git-send-email-stefanha@redhat.com> In-Reply-To: <1394703694-3281-3-git-send-email-stefanha@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 2/2] qtest: fix crash if SIGABRT during qtest_init() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , qemu-devel@nongnu.org, Marcel Apfelbaum Cc: Anthony Liguori Am 13.03.2014 10:41, schrieb Stefan Hajnoczi: > If an assertion fails during qtest_init() the SIGABRT handler is > invoked. This is the correct behavior since we need to kill the QEMU > process to avoid leaking it when the test dies. >=20 > The global_qtest pointer used by the SIGABRT handler is currently only > assigned after qtest_init() returns. This results in a segfault if an > assertion failure occurs during qtest_init(). >=20 > Move global_qtest assignment inside qtest_init(). Not pretty but let's > face it - the signal handler dependeds on global state. >=20 > Reported-by: Marcel Apfelbaum > Signed-off-by: Stefan Hajnoczi > --- > tests/libqtest.c | 3 ++- > tests/libqtest.h | 4 +--- > 2 files changed, 3 insertions(+), 4 deletions(-) Thanks, applied to qom-next (with typo fix): https://github.com/afaerber/qemu-cpu/commits/qom-next 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