From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LJ6L9-0005R7-9c for qemu-devel@nongnu.org; Sat, 03 Jan 2009 08:14:55 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LJ6L8-0005Qm-Gi for qemu-devel@nongnu.org; Sat, 03 Jan 2009 08:14:54 -0500 Received: from [199.232.76.173] (port=48529 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LJ6L8-0005Qg-AN for qemu-devel@nongnu.org; Sat, 03 Jan 2009 08:14:54 -0500 Received: from savannah.gnu.org ([199.232.41.3]:53713 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LJ6L8-0004vP-0g for qemu-devel@nongnu.org; Sat, 03 Jan 2009 08:14:54 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LJ6L7-0000j4-9B for qemu-devel@nongnu.org; Sat, 03 Jan 2009 13:14:53 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LJ6L6-0000j0-TB for qemu-devel@nongnu.org; Sat, 03 Jan 2009 13:14:53 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Sat, 03 Jan 2009 13:14:52 +0000 Subject: [Qemu-devel] [6151] Fix qemu endless loop when raising a SIGSEGV/ SIGBUS signal with gdbstub in user emulation Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 6151 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6151 Author: aurel32 Date: 2009-01-03 13:14:52 +0000 (Sat, 03 Jan 2009) Log Message: ----------- Fix qemu endless loop when raising a SIGSEGV/SIGBUS signal with gdbstub in user emulation When a SIGSEGV signal is raised in user mode emulation the current test to know whether the signal is sent by the kernel is wrong : info->si_code == SI_KERNEL according to /usr/include/bits/siginfo.h it should be info->si_code > 0 Signed-off-by: Lionel Landwerlin Signed-off-by: Aurelien Jarno Modified Paths: -------------- trunk/linux-user/signal.c Modified: trunk/linux-user/signal.c =================================================================== --- trunk/linux-user/signal.c 2009-01-03 12:36:05 UTC (rev 6150) +++ trunk/linux-user/signal.c 2009-01-03 13:14:52 UTC (rev 6151) @@ -441,9 +441,9 @@ target_siginfo_t tinfo; /* the CPU emulator uses some host signals to detect exceptions, - we we forward to it some signals */ + we forward to it some signals */ if ((host_signum == SIGSEGV || host_signum == SIGBUS) - && info->si_code == SI_KERNEL) { + && info->si_code > 0) { if (cpu_signal_handler(host_signum, info, puc)) return; }