[all-commits] [llvm/llvm-project] 6836a4: [DebugInfo] Add error checking around data extract...
Alex via All-commits
all-commits at lists.llvm.org
Tue Jun 6 10:51:44 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6836a47b7e6b57927664ec6ec750ae37bb951129
https://github.com/llvm/llvm-project/commit/6836a47b7e6b57927664ec6ec750ae37bb951129
Author: Alex Langford <alangford at apple.com>
Date: 2023-06-06 (Tue, 06 Jun 2023)
Changed paths:
M lld/test/MachO/stabs-dwarf5.s
M lld/test/MachO/stabs-icf.s
M lld/test/MachO/stabs.s
M llvm/lib/DebugInfo/DWARF/DWARFAbbreviationDeclaration.cpp
M llvm/unittests/DebugInfo/DWARF/DWARFDebugAbbrevTest.cpp
Log Message:
-----------
[DebugInfo] Add error checking around data extraction in DWARFAbbreviationDeclaration::extract
In trying to hoist errors further up this callstack, I discovered that
if the data in the debug_abbrev section is invalid entirely, the code
that parses the debug_abbrev section may do strange or unpredictable
things. The underlying issue is that DataExtractor will return a value
of 0 when it encounters an error in extracting a LEB128 value. It's thus
difficult to determine if there was an error just by looking at the
return value. This patch aims to bail at the first sight of an error in
the debug_abbrev parsing code.
Differential Revision: https://reviews.llvm.org/D151755
More information about the All-commits
mailing list