[all-commits] [llvm/llvm-project] 965fa4: [LFI][AArch64] Fix Segfault due to infinite recurs...

Sharjeel Khan via All-commits all-commits at lists.llvm.org
Fri Jul 17 14:19:44 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 965fa410dad7294cc1c1a9632ff94558de6dfa40
      https://github.com/llvm/llvm-project/commit/965fa410dad7294cc1c1a9632ff94558de6dfa40
  Author: Sharjeel Khan <sharjeelkhan at google.com>
  Date:   2026-07-17 (Fri, 17 Jul 2026)

  Changed paths:
    M llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCLFIRewriter.cpp
    A llvm/test/MC/AArch64/LFI/debug-info.s

  Log Message:
  -----------
  [LFI][AArch64] Fix Segfault due to infinite recursion in LFI rewriter (#210267)

When emitting a deferred LR guard, if debug info is enabled, the
emission of the guard instruction can trigger temporary labels (e.g. for
DWARF line entries), which recursively calls onLabel. Since
DeferredLRGuard was only set to false after emission, the nested call
would re-emit the guard, causing infinite recursion which leads to a
SegFault due to stack overflow. This was detected compiling
ubsan_minimal_handlers.cpp in compiler-rt. I fixed it by using the
existing recursion guard (Guard).



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