llvm-project/llvm/unittests/DebugInfo/DWARF
Pavel Labath 122c50d5ef Fix DWARFDataExtractor::getRelocatedValue near EOF
Summary:
If we have an (invalid) relocation which relocates bytes which partially
lie outside the range of the relocated section, the getRelocatedValue
would return confusing results. It would first read zero (because that's
what the underlying DataExtractor api does for out-of-bounds reads), and
then relocate that zero anyway.

A more appropriate behavior is to return zero straight away. This is
what this patch does.

Reviewers: dblaikie, jhenderson

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D78113
2020-04-15 12:47:57 +02:00
..
CMakeLists.txt Add a missing dependency to DebugInfoDWARF unit tests 2020-04-09 15:39:32 +02:00
DWARFAcceleratorTableTest.cpp [DWARF] Use DWARFDataExtractor::getInitialLength to parse debug_names 2020-03-02 11:21:23 +01:00
DWARFDataExtractorTest.cpp Fix DWARFDataExtractor::getRelocatedValue near EOF 2020-04-15 12:47:57 +02:00
DWARFDebugArangeSetTest.cpp Use DWARFDataExtractor::getInitialLength in debug_aranges 2020-03-04 13:01:07 +01:00
DWARFDebugFrameTest.cpp [DebugInfo] Do not truncate 64-bit values when dumping CIEs and FDEs. 2020-03-05 17:37:28 +07:00
DWARFDebugInfoTest.cpp [DebugInfo] Fix reading DWARFv5 type units in DWP. 2020-04-08 12:50:58 +07:00
DWARFDebugLineTest.cpp Cleanup the plumbing for DILineInfoSpecifier. [NFC - Try 2] 2020-03-20 10:29:57 -07:00
DWARFDieTest.cpp [DataExtractor] Improve error message when we run off the end of the buffer 2020-02-28 09:02:33 +01:00
DWARFFormValueTest.cpp [DWARF] Detect extraction errors in DWARFFormValue::extractValue 2020-04-09 13:41:02 +02:00
DWARFLocationExpressionTest.cpp Add streaming/equality operators to DWARFAddressRange/DWARFLocationExpression 2019-11-19 10:34:30 +01:00
DwarfGenerator.cpp Replace MCTargetOptionsCommandFlags.inc and CommandFlags.inc by runtime registration 2020-03-17 14:01:30 +01:00
DwarfGenerator.h [DebugInfo] Error if unsupported address size detected in line table 2020-02-14 11:08:12 +00:00
DwarfUtils.cpp Fix DWARF DebugInfo unit test errors when cross-compiling 2019-06-03 22:22:03 +00:00
DwarfUtils.h Fix DWARF DebugInfo unit test errors when cross-compiling 2019-06-03 22:22:03 +00:00