gdb/gdb-rhbz1420304-s390x-30of35.patch
Michael Matz 0ffa8e959b - Rebase to 8.0.1 release (fixing PR21886, PR22046)
- Updated libstdc++ pretty printers to
- Remove gdb-libstdc++-v3-python-6.3.1-20170212.tar.bz2 as unused
  in SUSE.
- Add patches for s390x z14 feates [fate #321514, fate #322272]
  gdb-s390x-1b63490.patch
  gdb-s390x-289e23a.patch
  gdb-s390x-8fe09d7.patch
  gdb-s390x-96235dc.patch
  gdb-s390x-ad33963.patch
- Adjust some patches:
  gdb-ppc-power7-test.patch
  gdb-rhbz795424-bitpos-20of25.patch
  gdb-rhbz795424-bitpos-21of25.patch
  gdb-vla-intel-fortran-vla-strings.patch
- Add some patches from Fedora:
  gdb-rhbz1420304-s390x-01of35.patch
  gdb-rhbz1420304-s390x-02of35.patch
  gdb-rhbz1420304-s390x-03of35.patch
  gdb-rhbz1420304-s390x-04of35.patch
  gdb-rhbz1420304-s390x-05of35.patch
  gdb-rhbz1420304-s390x-06of35.patch
  gdb-rhbz1420304-s390x-07of35.patch
  gdb-rhbz1420304-s390x-08of35.patch
  gdb-rhbz1420304-s390x-09of35.patch
  gdb-rhbz1420304-s390x-10of35.patch
  gdb-rhbz1420304-s390x-11of35.patch
  gdb-rhbz1420304-s390x-12of35.patch
  gdb-rhbz1420304-s390x-13of35.patch
  gdb-rhbz1420304-s390x-14of35.patch

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=167
2017-10-02 15:05:29 +00:00

86 lines
2.3 KiB
Diff

commit 93ec5e23766a9f75aa4950748cf73964028a8d1b
Author: Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Date: Mon Jun 26 11:01:58 2017 +0200
S/390: Fix testsuite segfault added with recent pgste patch.
The recent pgste patch caused several testcases to fail with a
segfault. Fixed with this patch by adding NULL pointer checks.
regression-tested on s390x.
bfd/ChangeLog:
2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* elf64-s390.c (elf_s390_additional_program_headers): Add NULL
pointer checks.
(elf_s390_modify_segment_map): Likewise.
(bfd_elf_s390_set_options): Lisewise.
### a/bfd/ChangeLog
### b/bfd/ChangeLog
## -1,3 +1,10 @@
+2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
+
+ * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
+ pointer checks.
+ (elf_s390_modify_segment_map): Likewise.
+ (bfd_elf_s390_set_options): Lisewise.
+
2017-06-26 Alan Modra <amodra@gmail.com>
* elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -3978,22 +3978,29 @@ elf_s390_additional_program_headers (bfd *abfd ATTRIBUTE_UNUSED,
{
struct elf_s390_link_hash_table *htab;
- htab = elf_s390_hash_table (info);
- return htab->params->pgste;
+ if (info)
+ {
+ htab = elf_s390_hash_table (info);
+ if (htab)
+ return htab->params->pgste;
+ }
+ return 0;
}
/* Add the PT_S390_PGSTE program header. */
static bfd_boolean
-elf_s390_modify_segment_map (bfd *abfd ATTRIBUTE_UNUSED,
- struct bfd_link_info *info)
+elf_s390_modify_segment_map (bfd *abfd, struct bfd_link_info *info)
{
struct elf_s390_link_hash_table *htab;
struct elf_segment_map *m, *pm = NULL;
+ if (!abfd || !info)
+ return TRUE;
+
htab = elf_s390_hash_table (info);
- if (!htab->params->pgste)
+ if (!htab || !htab->params->pgste)
return TRUE;
/* If there is already a PT_S390_PGSTE header, avoid adding
@@ -4027,8 +4034,12 @@ bfd_elf_s390_set_options (struct bfd_link_info *info,
{
struct elf_s390_link_hash_table *htab;
- htab = elf_s390_hash_table (info);
- htab->params = params;
+ if (info)
+ {
+ htab = elf_s390_hash_table (info);
+ if (htab)
+ htab->params = params;
+ }
return TRUE;
}