[all-commits] [llvm/llvm-project] ee72b1: Fix UB in DwarfExpression::emitLegacyZExt()

adrian-prantl via All-commits all-commits at lists.llvm.org
Wed Jan 26 13:08:57 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ee72b173869fd78c49bdd5b85a94fc35b8332ba6
      https://github.com/llvm/llvm-project/commit/ee72b173869fd78c49bdd5b85a94fc35b8332ba6
  Author: Adrian Prantl <aprantl at apple.com>
  Date:   2022-01-26 (Wed, 26 Jan 2022)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
    M llvm/test/DebugInfo/X86/convert-debugloc.ll

  Log Message:
  -----------
  Fix UB in DwarfExpression::emitLegacyZExt()

A shift-left > 63 triggers a UBSAN failure. This patch kicks the can
down the road (to the consumer) by emitting a more compact
representation of the shift computation in DWARF expressions.

Relanding (I accidentally pushed an earlier version of the patch previously).

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




More information about the All-commits mailing list