[all-commits] [llvm/llvm-project] 044308: [DebugInfo] Avoid crashing when parsing an invalid...

Igor Kudrin via All-commits all-commits at lists.llvm.org
Fri Feb 28 00:37:56 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 044308e9ed5cb69076eca7156a694f4d2844cf74
      https://github.com/llvm/llvm-project/commit/044308e9ed5cb69076eca7156a694f4d2844cf74
  Author: Igor Kudrin <ikudrin at accesssoftek.com>
  Date:   2020-02-28 (Fri, 28 Feb 2020)

  Changed paths:
    M llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
    A llvm/test/DebugInfo/X86/invalid-cu-length-dwp.s

  Log Message:
  -----------
  [DebugInfo] Avoid crashing when parsing an invalid unit header in DWP.

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.

Differential Revision: https://reviews.llvm.org/D75177


  Commit: 7a9d00f261a5fcc739fcde86849374c86bc9420b
      https://github.com/llvm/llvm-project/commit/7a9d00f261a5fcc739fcde86849374c86bc9420b
  Author: Igor Kudrin <ikudrin at accesssoftek.com>
  Date:   2020-02-28 (Fri, 28 Feb 2020)

  Changed paths:
    M llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
    A llvm/test/DebugInfo/X86/dwp-dwarf64.s

  Log Message:
  -----------
  [DebugInfo] Fix parsing DWARF64 units in DWP.

The integrity check code allowed only DWARF32 units.

Differential Revision: https://reviews.llvm.org/D75178


Compare: https://github.com/llvm/llvm-project/compare/5754a61e57ef...7a9d00f261a5


More information about the All-commits mailing list