diff options
author | Alan Modra <amodra@gmail.com> | 2021-12-15 15:06:26 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2021-12-16 08:57:57 +1030 |
commit | 161cdabc3927b144ffcff9bf7b1daf5fe32a193c (patch) | |
tree | dbcaf1c769b02d45f1b1974aa6f6252d4c6c4bfd /mkdep | |
parent | 261b07488b9dfe69090e6980f6de9d0f4f3f03ca (diff) | |
download | gdb-161cdabc3927b144ffcff9bf7b1daf5fe32a193c.zip gdb-161cdabc3927b144ffcff9bf7b1daf5fe32a193c.tar.gz gdb-161cdabc3927b144ffcff9bf7b1daf5fe32a193c.tar.bz2 |
PR28691, validate dwarf attribute form
PR28691 is a fuzzing PR that triggers a non-problem of "output changes
per run" with PIEs and/or different compilers. I've closed similar
PRs before as wontfix, but I guess there will be no end of this type
of PR. The trigger is an attribute that usually takes one of the
offset/constant reference DW_FORMs being given an indexed string
DW_FORM. The bfd reader doesn't support indexed strings and returns
an error string instead. The address of the string varies with PIE
runs and/or compiler, and we allow that address to appear in output.
Fix this by validating integer attribute forms, as we do for string
form attributes.
PR 28691
* dwarf2.c (is_str_attr): Rename to..
(is_str_form): ..this. Change param type. Update calls.
(is_int_form): New function.
(read_attribute_value): Handle DW_FORM_addrx2.
(find_abstract_instance): Validate form when using attr.u.val.
(scan_unit_for_symbols, parse_comp_unit): Likewise.
Diffstat (limited to 'mkdep')
0 files changed, 0 insertions, 0 deletions