https://sourceware.org/bugzilla/show_bug.cgi?id=29230

--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot 
gnu.org> ---
The master branch has been updated by Alan Modra <amo...@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=31d6c13defeba7716ebc9d5c8f81f2f35fe39980

commit 31d6c13defeba7716ebc9d5c8f81f2f35fe39980
Author: Alan Modra <amo...@gmail.com>
Date:   Tue Jun 14 12:46:42 2022 +0930

    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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to