diff options
author | Alan Modra <amodra@gmail.com> | 2022-06-14 12:46:42 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2022-06-15 10:24:33 +0930 |
commit | 31d6c13defeba7716ebc9d5c8f81f2f35fe39980 (patch) | |
tree | 33e4cf384691d48e0bcc87cfb21c5c2d0e0bf3ae /gdb/python/py-gdb-readline.c | |
parent | dac0515d825e788dec188fff4d5b9d4ac7383f33 (diff) | |
download | binutils-31d6c13defeba7716ebc9d5c8f81f2f35fe39980.zip binutils-31d6c13defeba7716ebc9d5c8f81f2f35fe39980.tar.gz binutils-31d6c13defeba7716ebc9d5c8f81f2f35fe39980.tar.bz2 |
PR29230, segv in lookup_symbol_in_variable_table
The PR23230 testcase uses indexed strings without specifying
SW_AT_str_offsets_base. In this case we left u.str with garbage (from
u.val) which then led to a segfault when attempting to access the
string. Fix that by clearing u.str. The patch also adds missing
sanity checks in the recently committed read_indexed_address and
read_indexed_string functions.
PR 29230
* dwarf2.c (read_indexed_address): Return uint64_t. Sanity check idx.
(read_indexed_string): Use uint64_t for str_offset. Sanity check idx.
(read_attribute_value): Clear u.str for indexed string forms when
DW_AT_str_offsets_base is not yet read or missing.
Diffstat (limited to 'gdb/python/py-gdb-readline.c')
0 files changed, 0 insertions, 0 deletions