[all-commits] [llvm/llvm-project] f1dad0: [DWARFLinker] Handle empty sequences when processi...

alx32 via All-commits all-commits at lists.llvm.org
Wed Mar 26 17:04:48 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f1dad0bcb58f2b8bf0d847d4a65909b797be4fa1
      https://github.com/llvm/llvm-project/commit/f1dad0bcb58f2b8bf0d847d4a65909b797be4fa1
  Author: alx32 <103613512+alx32 at users.noreply.github.com>
  Date:   2025-03-26 (Wed, 26 Mar 2025)

  Changed paths:
    M llvm/lib/DWARFLinker/Classic/DWARFLinker.cpp
    M llvm/test/tools/dsymutil/ARM/stmt-seq-macho.test
    M llvm/test/tools/dsymutil/Inputs/private/tmp/stmt_seq/stmt_seq_macho.exe
    M llvm/test/tools/dsymutil/Inputs/private/tmp/stmt_seq/stmt_seq_macho.o

  Log Message:
  -----------
  [DWARFLinker] Handle empty sequences when processing `DW_AT_LLVM_stmt_sequence` attributes (#132875)

We previously assumed that every `DW_AT_LLVM_stmt_sequence` attribute
has a corresponding sequence in the processed line table. However, this
isn't always true. Some sequences can be removed by the linker if they
are empty, as shown
[here](https://github.com/alx32/llvm-project/blob/release/14.x/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp#L565-L566).
When an attribute refers to one of these removed sequences, there is no
actual sequence for it to match. In such cases, we update the attribute
to indicate that it is invalid and does not point to any sequence. This
informs readers that the attribute should be ignored.

The newly modified test would have triggered the assert that is being
removed in this patch.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list