[all-commits] [llvm/llvm-project] fefe6a: Fix undefined behavior in DWARF emission

linzj via All-commits all-commits at lists.llvm.org
Mon Jul 13 18:38:11 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: fefe6a6642e475cd6d624c502120cb061da8144e
      https://github.com/llvm/llvm-project/commit/fefe6a6642e475cd6d624c502120cb061da8144e
  Author: zuojian lin <manjian2006 at gmail.com>
  Date:   2020-07-13 (Mon, 13 Jul 2020)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h

  Log Message:
  -----------
  Fix undefined behavior in DWARF emission

Caused by uninitialized load of llvm::DwarfDebug::PrevCU:
llvm::DwarfCompileUnit::addRange () at ../lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:276
llvm::DwarfDebug::endFunctionImpl () at ../lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1586
llvm::DebugHandlerBase::endFunction () at ../lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp:319
llvm::AsmPrinter::EmitFunctionBody () at ../lib/CodeGen/AsmPrinter/AsmPrinter.cpp:1230
llvm::ARMAsmPrinter::runOnMachineFunction () at ../lib/Target/ARM/ARMAsmPrinter.cpp:161

Most of the DebugInfo tests under `LLVM_LIT_ARGS:STRING=-sv --vg` prior to this fix, and pass with the fix applied.

Reviewed By: aprantl, dblaikie

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




More information about the All-commits mailing list