[PATCH] D73040: [DWARF] Get rid of DWARFDebugNames::HeaderPOD. NFC.
Jonas Devlieghere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 21 12:42:08 PST 2020
JDevlieghere added a comment.
Is there any way we can test this?
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp:394
// Check that we can read the fixed-size part.
- if (!AS.isValidOffset(*Offset + sizeof(HeaderPOD) - 1))
+ if (!AS.isValidOffsetForDataOfSize(*Offset, DWARF32HeaderFixedPartSize))
return createStringError(errc::illegal_byte_sequence,
----------------
How does this solve the issue exactly? Aren't we still checking the DWARF32 case only? I would expect something like
```
HeaderSize = dwarf::getUnitLengthFieldByteSize(IsDWARF64 ? dwarf::DWARF64 : dwarf::DWARF32) + CommonHeaderSize;
```
but maybe I'm misunderstanding what's going on here?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73040/new/
https://reviews.llvm.org/D73040
More information about the llvm-commits
mailing list