[all-commits] [llvm/llvm-project] 11e2a1: [RemoveDIs] Fix spliceDebugInfo splice-to-end edge...

Orlando Cazalet-Hyams via All-commits all-commits at lists.llvm.org
Tue Sep 10 07:40:04 PDT 2024


  Branch: refs/heads/release/19.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 11e2a1552f92ccb080d08083ceb71f7e6ed4db78
      https://github.com/llvm/llvm-project/commit/11e2a1552f92ccb080d08083ceb71f7e6ed4db78
  Author: Orlando Cazalet-Hyams <orlando.hyams at sony.com>
  Date:   2024-09-10 (Tue, 10 Sep 2024)

  Changed paths:
    M llvm/lib/IR/BasicBlock.cpp
    M llvm/unittests/IR/BasicBlockDbgInfoTest.cpp

  Log Message:
  -----------
  [RemoveDIs] Fix spliceDebugInfo splice-to-end edge case (#105671)

Fix #105571 which demonstrates an end() iterator dereference when
performing a non-empty splice to end() from a region that ends at
Src::end().

Rather than calling Instruction::adoptDbgRecords from Dest, create a marker
(which takes an iterator) and absorbDebugValues onto that. The "absorb" variant
doesn't clean up the source marker, which in this case we know is a trailing
marker, so we have to do that manually.

(cherry picked from commit 43661a1214353ea1773a711f403f8d1118e9ca0f)



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