[all-commits] [llvm/llvm-project] be4097: Fix crash lowering stack guard on OpenBSD/aarch64....

3405691582 via All-commits all-commits at lists.llvm.org
Fri May 9 13:11:57 PDT 2025


  Branch: refs/heads/release/20.x
  Home:   https://github.com/llvm/llvm-project
  Commit: be4097b6ee5793c33f6731e9cf908e67d627fded
      https://github.com/llvm/llvm-project/commit/be4097b6ee5793c33f6731e9cf908e67d627fded
  Author: 3405691582 <dsk at google.com>
  Date:   2025-05-09 (Fri, 09 May 2025)

  Changed paths:
    M llvm/lib/CodeGen/TargetLoweringBase.cpp

  Log Message:
  -----------
  Fix crash lowering stack guard on OpenBSD/aarch64. (#125416)

TargetLoweringBase::getIRStackGuard refers to a platform-specific guard
variable. Before this change, TargetLoweringBase::getSDagStackGuard only
referred to a different variable.

This means that SelectionDAGBuilder's getLoadStackGuard does not get
memory operands. However, AArch64InstrInfo::expandPostRAPseudo assumes
that the passed MachineInstr has nonzero memoperands, causing a
segfault.

We have two possible options here: either disabling the LOAD_STACK_GUARD
node entirely in AArch64TargetLowering::useLoadStackGuardNode or just
making the platform-specific values match across TargetLoweringBase.
Here, we try the latter.

(cherry picked from commit c180e249d0013474d502cd779ec65b33cf7e9468)



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