|
|
b94e32 |
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
|
|
b94e32 |
From: Fedora GDB patches <invalid@email.com>
|
|
|
b94e32 |
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
|
|
b94e32 |
Subject: gdb-6.5-last-address-space-byte-test.patch
|
|
|
b94e32 |
|
|
|
b94e32 |
;; Testcase for deadlocking on last address space byte; for corrupted backtraces.
|
|
|
b94e32 |
;;=fedoratest
|
|
|
b94e32 |
|
|
|
b94e32 |
diff --git a/gdb/testsuite/gdb.base/largecore-last-address-lock.exp b/gdb/testsuite/gdb.base/largecore-last-address-lock.exp
|
|
|
b94e32 |
new file mode 100644
|
|
|
b94e32 |
--- /dev/null
|
|
|
b94e32 |
+++ b/gdb/testsuite/gdb.base/largecore-last-address-lock.exp
|
|
|
b94e32 |
@@ -0,0 +1,49 @@
|
|
|
b94e32 |
+# Copyright 2006 Free Software Foundation, Inc.
|
|
|
b94e32 |
+
|
|
|
b94e32 |
+# This program is free software; you can redistribute it and/or modify
|
|
|
b94e32 |
+# it under the terms of the GNU General Public License as published by
|
|
|
b94e32 |
+# the Free Software Foundation; either version 2 of the License, or
|
|
|
b94e32 |
+# (at your option) any later version.
|
|
|
b94e32 |
+#
|
|
|
b94e32 |
+# This program is distributed in the hope that it will be useful,
|
|
|
b94e32 |
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
b94e32 |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
b94e32 |
+# GNU General Public License for more details.
|
|
|
b94e32 |
+#
|
|
|
b94e32 |
+# You should have received a copy of the GNU General Public License
|
|
|
b94e32 |
+# along with this program; if not, write to the Free Software
|
|
|
b94e32 |
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
b94e32 |
+
|
|
|
b94e32 |
+if $tracelevel then {
|
|
|
b94e32 |
+ strace $tracelevel
|
|
|
b94e32 |
+}
|
|
|
b94e32 |
+
|
|
|
b94e32 |
+# Get things started.
|
|
|
b94e32 |
+
|
|
|
b94e32 |
+gdb_exit
|
|
|
b94e32 |
+gdb_start
|
|
|
b94e32 |
+
|
|
|
b94e32 |
+# i386 (32-bit) only: gdb with Red Hat largecore patch did lock up:
|
|
|
b94e32 |
+# https://enterprise.redhat.com/issue-tracker/?module=issues&action=view&tid=103263
|
|
|
b94e32 |
+# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=210614
|
|
|
b94e32 |
+
|
|
|
b94e32 |
+# i386: Bug exists when the `target_xfer_memory' condition
|
|
|
b94e32 |
+# `(memaddr + len < region->hi)' operates on 64-bit operands on
|
|
|
b94e32 |
+# largecore-patched with 32-bit addresses and so it can get `false' with
|
|
|
b94e32 |
+# arbitrary `len'.
|
|
|
b94e32 |
+
|
|
|
b94e32 |
+# x86_64: The bug is not present as the operands and calculations have the same
|
|
|
b94e32 |
+# bit size. Would would still need to pass there the highest address
|
|
|
b94e32 |
+# (`memaddr == 0xffffffffffffffff') but we would need to pass `len == 0'
|
|
|
b94e32 |
+# to make the condition `(memaddr + len < region->hi)' false.
|
|
|
b94e32 |
+# `len == 0' would get caught eariler.
|
|
|
b94e32 |
+
|
|
|
b94e32 |
+# Error in the success case is immediate.
|
|
|
b94e32 |
+set timeoutold ${timeout}
|
|
|
b94e32 |
+set timeout 10
|
|
|
b94e32 |
+
|
|
|
b94e32 |
+gdb_test "x/xb 0xffffffff" \
|
|
|
b94e32 |
+ "Cannot access memory at address 0xffffffff" \
|
|
|
b94e32 |
+ "Read the last address space byte"
|
|
|
b94e32 |
+
|
|
|
b94e32 |
+set timeout ${timeoutold}
|