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