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

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


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 216002c4bb708e6d6fd1895c8ea636470961f824
      https://github.com/llvm/llvm-project/commit/216002c4bb708e6d6fd1895c8ea636470961f824
  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.

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




More information about the All-commits mailing list