diff options
| author | Pavel Labath <labath@google.com> | 2018-01-29 13:53:48 +0000 |
|---|---|---|
| committer | Pavel Labath <labath@google.com> | 2018-01-29 13:53:48 +0000 |
| commit | e7264106d4ce1ff0e48506fad207052accae3131 (patch) | |
| tree | 75a7a9f8e41fd86e5815f18c54f04f6ea1c8e835 /llvm/lib | |
| parent | dffb1a806cc60ca46fefaa579b3b4b648750a967 (diff) | |
| download | bcm5719-llvm-e7264106d4ce1ff0e48506fad207052accae3131.tar.gz bcm5719-llvm-e7264106d4ce1ff0e48506fad207052accae3131.zip | |
Fix windows test failure caused by r323638
The test was failing because of an incorrect sizeof check in the name
index parsing code. This code was meant to check that we have enough
input to parse the fixed-size part of the dwarf header, which it did by
comparing the input to sizeof(Header). Originally struct Header only
contained the fixed-size part, but during review, we've moved additional
members into it, which rendered the sizeof check invalid.
I resolve this by moving the fixed-size part to a separate struct and
updating the sizeof-expression to use that.
llvm-svn: 323648
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp b/llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp index 203f8849974..9111d732a8f 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp @@ -331,7 +331,7 @@ void DWARFDebugNames::Header::dump(ScopedPrinter &W) const { llvm::Error DWARFDebugNames::Header::extract(const DWARFDataExtractor &AS, uint32_t *Offset) { // Check that we can read the fixed-size part. - if (!AS.isValidOffset(*Offset + sizeof(Header) - 1)) + if (!AS.isValidOffset(*Offset + sizeof(HeaderPOD) - 1)) return make_error<StringError>("Section too small: cannot read header.", inconvertibleErrorCode()); |

