From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:38798) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ReWoK-0001nb-5Q for qemu-devel@nongnu.org; Sat, 24 Dec 2011 13:59:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ReWoJ-0005aJ-5v for qemu-devel@nongnu.org; Sat, 24 Dec 2011 13:59:12 -0500 Received: from mnementh.archaic.org.uk ([81.2.115.146]:38804) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ReWoJ-0005a0-02 for qemu-devel@nongnu.org; Sat, 24 Dec 2011 13:59:11 -0500 From: Peter Maydell Date: Sat, 24 Dec 2011 18:59:05 +0000 Message-Id: <1324753147-5747-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH 0/2] ARM: fix crash/abort when setting invalid mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: patches@linaro.org https://bugs.launchpad.net/qemu/+bug/607794 reports a problem where qemu will segfault if you try to set CPSR to an invalid mode via the gdb stub. These patches fix the segfault by not using cpu_single_env when it might not be valid, and also avoid the problem by not aborting in this situation. Instead we simply ignore attempts to set the mode field to an invalid value. (This case is UNPREDICTABLE so this is a legitimate choice, and behaviour that can be provoked by guests or confused users at the debugger shouldn't cause us to abort.) Peter Maydell (2): target-arm: Don't use cpu_single_env in bank_number() target-arm: Ignore attempts to set invalid modes in CPSR target-arm/helper.c | 42 +++++++++++++++++++++++++++++++++++------- 1 files changed, 35 insertions(+), 7 deletions(-) -- 1.7.5.4