[all-commits] [llvm/llvm-project] 61671e: [DebugInfo] Fix faulty DIExpression::appendToStack...

David Stenberg via All-commits all-commits at lists.llvm.org
Fri Mar 15 04:51:28 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 61671e2500771dfbf502acd86e2ef70cba847a39
      https://github.com/llvm/llvm-project/commit/61671e2500771dfbf502acd86e2ef70cba847a39
  Author: David Stenberg <david.stenberg at ericsson.com>
  Date:   2024-03-15 (Fri, 15 Mar 2024)

  Changed paths:
    M llvm/lib/IR/DebugInfoMetadata.cpp
    M llvm/unittests/IR/MetadataTest.cpp

  Log Message:
  -----------
  [DebugInfo] Fix faulty DIExpression::appendToStack assert (#85255)

The appendToStack() function asserts that no DW_OP_stack_value or
DW_OP_LLVM_fragment operations are present in the operations to be
appended. The function did that by iterating over all elements in the
array rather than just the operations, leading it to falsely asserting
on the following input produced by getExt(), since 159 (0x9f) is the
DWARF code for DW_OP_stack_value:

  {dwarf::DW_OP_LLVM_convert, 159, dwarf::DW_ATE_signed}

Fix this by using expr_op iterators.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list