[all-commits] [llvm/llvm-project] ad3257: [DWARFVerifier] Allow overlapping ranges for ICF-m...
alx32 via All-commits
all-commits at lists.llvm.org
Tue Dec 17 11:01:18 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ad32576cffc88bf7c359a528afbed7c2ae7ddb2d
https://github.com/llvm/llvm-project/commit/ad32576cffc88bf7c359a528afbed7c2ae7ddb2d
Author: alx32 <103613512+alx32 at users.noreply.github.com>
Date: 2024-12-17 (Tue, 17 Dec 2024)
Changed paths:
M llvm/include/llvm/DebugInfo/DWARF/DWARFVerifier.h
M llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
A llvm/test/tools/llvm-dwarfdump/X86/verify_no_overlap_error_icf.yaml
M llvm/test/tools/llvm-dwarfdump/X86/verify_parent_zero_length.yaml
M llvm/test/tools/llvm-dwarfutil/ELF/X86/verify.test
Log Message:
-----------
[DWARFVerifier] Allow overlapping ranges for ICF-merged functions (#117952)
This patch modifies the DWARF verifier to handle a valid case where two
or more functions have identical address ranges due to being merged by
ICF (Identical Code Folding). Previously, the verifier would incorrectly
report these as errors, but functions merged via ICF (such as when using
LLD's --keep-icf-stabs option) can legitimately share the same address
range.
A new test case has been added to verify this behavior using YAML-based
DWARF data that simulates two DW_TAG_subprogram entries with identical
address ranges. The test ensures that the verifier correctly identifies
this as a valid case and doesn't emit any errors, while still
maintaining the existing verification for truly invalid overlapping
ranges in other scenarios. Before this change, the newly added test case
would have failed, with `llvm-dwarfdump` marking the overlapping address
ranges in the DWARF as an error.
We also modify the existing tests `llvm-dwarfutil/ELF/X86/verify.test` and
`llvm/test/tools/llvm-dwarfdump/X86/verify_parent_zero_length.yaml`
which rely on the existence of the error that we're trying to
suppress. We slightly change one offset so that the ranges don't
perfectly overlap and an error is still generated.
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