[all-commits] [llvm/llvm-project] 5da385: Fix an offset underflow bug in DwarfExpression whe...

adrian-prantl via All-commits all-commits at lists.llvm.org
Wed Nov 20 17:08:08 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 5da385fb56cbe92d8bd8f53954056eca1829fe1b
      https://github.com/llvm/llvm-project/commit/5da385fb56cbe92d8bd8f53954056eca1829fe1b
  Author: Adrian Prantl <aprantl at apple.com>
  Date:   2019-11-20 (Wed, 20 Nov 2019)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
    A llvm/test/DebugInfo/MIR/ARM/larger-subregister.mir
    M llvm/test/MC/X86/dwarf-size-field-overflow.test

  Log Message:
  -----------
  Fix an offset underflow bug in DwarfExpression when describing small values with subregisters

DwarfExpression::addMachineReg() knows how to build a larger register
that isn't expressible in DWARF by combining multiple
subregisters. However, if the entire value fits into just one
subregister, it would still emit the other subregisters, leading to
all sorts of inconsistencies down the line.

This patch fixes that by moving an already existing(!) check whether
the subregister's offset is before the end of the value to the right
place.

rdar://problem/57294211

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




More information about the All-commits mailing list