diff options
author | Alan Modra <amodra@gmail.com> | 2023-03-28 12:00:02 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2023-03-28 12:10:28 +1030 |
commit | d75137c755cb2c9b36af5f3aeb1f919b411c8e41 (patch) | |
tree | 2727a3a4fbf3ef1caad8581c8ffd646dd41343ad /bfd | |
parent | 5d15dc76588b93ed51eec803bd87d2d71f35481d (diff) | |
download | gdb-d75137c755cb2c9b36af5f3aeb1f919b411c8e41.zip gdb-d75137c755cb2c9b36af5f3aeb1f919b411c8e41.tar.gz gdb-d75137c755cb2c9b36af5f3aeb1f919b411c8e41.tar.bz2 |
ubsan: elfnn-aarch64.c:4595:19: runtime error: load of value 190
which is not a valid value for type '_Bool'
* elfnn-aarch64.c (stub_hash_newfunc): Clear all fields past root.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/elfnn-aarch64.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c index c321ceb..c4db1e6 100644 --- a/bfd/elfnn-aarch64.c +++ b/bfd/elfnn-aarch64.c @@ -2767,14 +2767,9 @@ stub_hash_newfunc (struct bfd_hash_entry *entry, /* Initialize the local fields. */ eh = (struct elf_aarch64_stub_hash_entry *) entry; - eh->adrp_offset = 0; - eh->stub_sec = NULL; - eh->stub_offset = 0; - eh->target_value = 0; - eh->target_section = NULL; - eh->stub_type = aarch64_stub_none; - eh->h = NULL; - eh->id_sec = NULL; + memset (&eh->stub_sec, 0, + (sizeof (struct elf_aarch64_stub_hash_entry) + - offsetof (struct elf_aarch64_stub_hash_entry, stub_sec))); } return entry; |