[all-commits] [llvm/llvm-project] 8fe3fd: [CodeExtractor][Verifier] Fix OoB read when a DIEx...

Oliver Hunt via All-commits all-commits at lists.llvm.org
Mon Sep 28 00:52:09 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8fe3fdd6630e04b48dd8253894a8d4ba429e4663
      https://github.com/llvm/llvm-project/commit/8fe3fdd6630e04b48dd8253894a8d4ba429e4663
  Author: Oliver Hunt <oliver at apple.com>
  Date:   2026-09-28 (Mon, 28 Sep 2026)

  Changed paths:
    M llvm/lib/IR/Verifier.cpp
    M llvm/lib/Transforms/Utils/CodeExtractor.cpp
    A llvm/test/Assembler/invalid-diexpression-arg-negative.ll
    A llvm/test/DebugInfo/AArch64/dbg-value-arg-index-out-of-range.ll
    A llvm/test/Transforms/HotColdSplit/split-out-dbg-val-arglist.ll
    A llvm/test/Verifier/dbg-record-expression-arg-out-of-range.ll

  Log Message:
  -----------
  [CodeExtractor][Verifier] Fix OoB read when a DIExpression is used multiple times (#226857)

#224360 made fixupDebugInfoPostExtraction reuse the existing
DIExpression, but this is not sound if the expression is referenced
multiple times, as occurs with cold/hot code splitting.

This PR is the trivial fix of restricting this change to only apply if
there is a single user of the expression.

I've also added an additional verifier guard to capture these failures.

Fixes #226848

AI usage: Claude used to find a way to construct
dbg-value-arg-index-out-of-range.ll so that I could add a verifier guard
that bypassed the other existing verifier guards.



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