[all-commits] [llvm/llvm-project] a17c90: Re-land "[dsymutil] Account for DW_OP_convert bein...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Tue Jul 12 18:47:01 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a17c90daf2e7c3b1817ec29ad6648ce89b927f9a
      https://github.com/llvm/llvm-project/commit/a17c90daf2e7c3b1817ec29ad6648ce89b927f9a
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2022-07-12 (Tue, 12 Jul 2022)

  Changed paths:
    M llvm/lib/DWARFLinker/DWARFLinker.cpp
    A llvm/test/tools/dsymutil/Inputs/private/tmp/op-convert-offset/op-convert-offset
    A llvm/test/tools/dsymutil/Inputs/private/tmp/op-convert-offset/op-convert-offset.o
    A llvm/test/tools/dsymutil/X86/op-convert-offset.test

  Log Message:
  -----------
  Re-land "[dsymutil] Account for DW_OP_convert being CU relative"

Currently, dsymutil treats the DW_OP_convert operand as absolute instead
of CU relative, as described by in the DWARFv5 spec, 2.5.1.6:

  "[DW_OP_convert] takes one operand, which is an unsigned LEB128 integer
  that represents the offset of a debugging information entry in the current
  compilation unit"

This patch makes dsymutil correctly treat the offset as CU relative,
preventing a crash when there are multiple compilation units.

Big thanks to Akira Hatanaka for figuring out this issue and providing
both a reduced test case and a proposed fix.




More information about the All-commits mailing list