diff options
author | Mark Wielaard <mark@klomp.org> | 2020-10-19 10:17:59 +0200 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2020-10-26 22:44:07 +0100 |
commit | 5621fe5443da23112170235dd5cac161e5c75e65 (patch) | |
tree | 84f8a677b49968f253413aca0a5be2cc1b3b13c1 /tests/ChangeLog | |
parent | e14a5561f7ccb7cec598767d6660a21e8049a818 (diff) | |
download | elfutils-5621fe5443da23112170235dd5cac161e5c75e65.tar.gz |
libdw: dwarf_frame_register takes an array of at least 3 Dwarf_Ops
GCC11 will warn about a mismatch in the declaration of dwarf_frame_register:
dwarf_frame_register.c:37:61: error: argument 3 of type ‘Dwarf_Op *’
declared as a pointer [-Werror=array-parameter=]
37 | dwarf_frame_register (Dwarf_Frame *fs, int regno, Dwarf_Op *ops_mem,
| ~~~~~~~~~~^~~~~~~
libdw.h:1068:43: note: previously declared as an array ‘Dwarf_Op[3]’
1068 | Dwarf_Op ops_mem[3],
| ~~~~~~~~~^~~~~~~~~~
When fixing that it will show an actual bug in the addrcfi testcase:
addrcfi.c:98:16: error: ‘dwarf_frame_register’ accessing 96 bytes in a
region of size 64 [-Werror=stringop-overflow=]
98 | int result = dwarf_frame_register (stuff->frame, regno, ops_mem, &ops, &nops);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
addrcfi.c:98:16: note: referencing argument 3 of type ‘Dwarf_Op *’
1069 | extern int dwarf_frame_register (Dwarf_Frame *frame, int regno,
| ^~~~~~~~~~~~~~~~~~~~
Fix the declaration, fix the bug and add an extra comment to the description
in libdw.h.
Signed-off-by: Mark Wielaard <mark@klomp.org>
Diffstat (limited to 'tests/ChangeLog')
-rw-r--r-- | tests/ChangeLog | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog index 43714ff1..e9d1e260 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,5 +1,9 @@ 2020-10-19 Mark Wielaard <mark@klomp.org> + * addrcfi.c (print_register): Make ops_mem 3 elements. + +2020-10-19 Mark Wielaard <mark@klomp.org> + * testfile60.bz2: Removed. * Makefile.am (EXTRA_DIST): Remove testfile60.bz2. * run-allregs.sh: Remove tilegx testfile60 testcase. |