This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PING][PATCH v4 0/3] Aarch64: Fix segfault when casting dummy calls
- From: Alan Hayward <Alan dot Hayward at arm dot com>
- To: GDB Patches <gdb-patches at sourceware dot org>
- Cc: nd <nd at arm dot com>
- Date: Thu, 8 Nov 2018 15:15:18 +0000
- Subject: [PING][PATCH v4 0/3] Aarch64: Fix segfault when casting dummy calls
- References: <20181031111754.64707-1-alan.hayward@arm.com>
Ping.
Begin forwarded message:
From: Alan Hayward <Alan.Hayward@arm.com<mailto:Alan.Hayward@arm.com>>
Subject: [PATCH v4 0/3] Aarch64: Fix segfault when casting dummy calls
Date: 31 October 2018 at 11:18:04 GMT
To: "gdb-patches@sourceware.org<mailto:gdb-patches@sourceware.org>" <gdb-patches@sourceware.org<mailto:gdb-patches@sourceware.org>>
Cc: nd <nd@arm.com<mailto:nd@arm.com>>, Alan Hayward <Alan.Hayward@arm.com<mailto:Alan.Hayward@arm.com>>
This version cleans up a few things and includes a very different testcase.
The following will segfault on aarch64 if foo is in another object,
was compiled as c++ and has no debug symbols:
(gdb) p (int)foo()
The fix is to remove a bunch of code from aarch64_push_dummy_call,
instead passing down the information from the caller.
Patch 1 removes two ints from call_function_by_hand_dummy, replacing
them with an enum.
Patch 2 passes that enum down to _push_dummy_call.
Patch 3 makes use of the enum in aarch64_push_dummy_call and adds a
test case.
Tested with make check on aarch64 and build with all targets on x86.
Patch 2 needs a careful scan to make sure it doesn't break any other
targets.
Alan Hayward (3):
Use enum for return method for dummy calls
Pass return_method to _push_dummy_call
Aarch64: Fix segfault when casting dummy calls
gdb/aarch64-tdep.c | 35 +----
gdb/alpha-tdep.c | 7 +-
gdb/amd64-tdep.c | 13 +-
gdb/amd64-windows-tdep.c | 12 +-
gdb/arc-tdep.c | 5 +-
gdb/arm-tdep.c | 5 +-
gdb/avr-tdep.c | 5 +-
gdb/bfin-tdep.c | 4 +-
gdb/cris-tdep.c | 9 +-
gdb/csky-tdep.c | 5 +-
gdb/frv-tdep.c | 5 +-
gdb/gdbarch.c | 4 +-
gdb/gdbarch.h | 27 +++-
gdb/gdbarch.sh | 25 +++-
gdb/h8300-tdep.c | 5 +-
gdb/hppa-tdep.c | 10 +-
gdb/i386-darwin-tdep.c | 5 +-
gdb/i386-tdep.c | 5 +-
gdb/ia64-tdep.c | 11 +-
gdb/infcall.c | 28 ++--
gdb/iq2000-tdep.c | 9 +-
gdb/lm32-tdep.c | 5 +-
gdb/m32c-tdep.c | 5 +-
gdb/m32r-tdep.c | 5 +-
gdb/m68hc11-tdep.c | 9 +-
gdb/m68k-tdep.c | 5 +-
gdb/mep-tdep.c | 4 +-
gdb/mips-tdep.c | 19 +--
gdb/mn10300-tdep.c | 6 +-
gdb/msp430-tdep.c | 5 +-
gdb/nds32-tdep.c | 5 +-
gdb/nios2-tdep.c | 5 +-
gdb/or1k-tdep.c | 5 +-
gdb/ppc-sysv-tdep.c | 10 +-
gdb/ppc-tdep.h | 25 ++--
gdb/riscv-tdep.c | 8 +-
gdb/rl78-tdep.c | 5 +-
gdb/rs6000-aix-tdep.c | 5 +-
gdb/rs6000-lynx178-tdep.c | 5 +-
gdb/rx-tdep.c | 8 +-
gdb/s390-tdep.c | 7 +-
gdb/score-tdep.c | 5 +-
gdb/sh-tdep.c | 9 +-
gdb/sparc-tdep.c | 15 +-
gdb/sparc64-tdep.c | 14 +-
gdb/spu-tdep.c | 5 +-
.../gdb.base/infcall-across-obj-lib.c | 22 +++
.../gdb.base/infcall-across-obj-main.c | 24 ++++
gdb/testsuite/gdb.base/infcall-across-obj.exp | 134 ++++++++++++++++++
gdb/tic6x-tdep.c | 5 +-
gdb/tilegx-tdep.c | 4 +-
gdb/v850-tdep.c | 4 +-
gdb/vax-tdep.c | 5 +-
gdb/xstormy16-tdep.c | 9 +-
gdb/xtensa-tdep.c | 10 +-
55 files changed, 442 insertions(+), 208 deletions(-)
create mode 100644 gdb/testsuite/gdb.base/infcall-across-obj-lib.c
create mode 100644 gdb/testsuite/gdb.base/infcall-across-obj-main.c
create mode 100644 gdb/testsuite/gdb.base/infcall-across-obj.exp
--
2.17.1 (Apple Git-112)