* [committed] MIPS/BFD: Fix assertion in `mips_elf_sort_hash_table'
@ 2017-02-02 22:51 Maciej W. Rozycki
0 siblings, 0 replies; only message in thread
From: Maciej W. Rozycki @ 2017-02-02 22:51 UTC (permalink / raw)
To: binutils
Move the assertion on non-NULL `htab' in `mips_elf_sort_hash_table' to
the beginning, before the pointer is dereferenced (`mips_elf_hash_table
(info)' and `elf_hash_table (info)' both point to the same memory
location, differently typed).
bfd/
* elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
non-NULL `htab' to the beginning.
---
binutils-mips-bfd-elf-sort-hash-table-assert.diff
Index: binutils/bfd/elfxx-mips.c
===================================================================
--- binutils.orig/bfd/elfxx-mips.c 2017-02-01 14:50:03.082396853 +0000
+++ binutils/bfd/elfxx-mips.c 2017-02-02 00:56:23.581898707 +0000
@@ -3832,12 +3832,12 @@ mips_elf_sort_hash_table (bfd *abfd, str
struct mips_elf_hash_sort_data hsd;
struct mips_got_info *g;
- if (elf_hash_table (info)->dynsymcount == 0)
- return TRUE;
-
htab = mips_elf_hash_table (info);
BFD_ASSERT (htab != NULL);
+ if (elf_hash_table (info)->dynsymcount == 0)
+ return TRUE;
+
g = htab->got_info;
if (g == NULL)
return TRUE;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-02-02 22:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-02 22:51 [committed] MIPS/BFD: Fix assertion in `mips_elf_sort_hash_table' Maciej W. Rozycki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).