[PATCH] D75177: [DebugInfo] Avoid a crash when parsing an invalid unit header in DWP.

Igor Kudrin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 26 07:13:47 PST 2020


ikudrin created this revision.
ikudrin added reviewers: dblaikie, jhenderson, probinson, aprantl.
ikudrin added projects: LLVM, debug-info.
Herald added a subscriber: hiraditya.

The integrity checks for index entries in `DWARFUnitHeader::extract()` might cause the function to return before checking the state of an `Error` object, which leads to a crash in runtime. The patch fixes the issue by moving the checks in a safe place.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D75177

Files:
  llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
  llvm/test/DebugInfo/X86/invalid-cu-length-dwp.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75177.246712.patch
Type: text/x-patch
Size: 3661 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200226/78d8b9c1/attachment.bin>


More information about the llvm-commits mailing list