[all-commits] [llvm/llvm-project] dc9f65: [AArch64][SVE] Fix handling of stack protection wi...

john-brawn-arm via All-commits all-commits at lists.llvm.org
Tue Dec 14 03:31:26 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dc9f65be4555406262ff693c8bac5f1f0b960a97
      https://github.com/llvm/llvm-project/commit/dc9f65be4555406262ff693c8bac5f1f0b960a97
  Author: John Brawn <john.brawn at arm.com>
  Date:   2021-12-14 (Tue, 14 Dec 2021)

  Changed paths:
    M llvm/include/llvm/CodeGen/StackProtector.h
    M llvm/lib/CodeGen/LocalStackSlotAllocation.cpp
    M llvm/lib/CodeGen/PrologEpilogInserter.cpp
    M llvm/lib/CodeGen/StackProtector.cpp
    M llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    A llvm/test/CodeGen/AArch64/stack-guard-reassign-sve.mir
    A llvm/test/CodeGen/AArch64/stack-guard-sve.ll

  Log Message:
  -----------
  [AArch64][SVE] Fix handling of stack protection with SVE

Fix a couple of things that were causing stack protection to not work
correctly in functions that have scalable vectors on the stack:
 * Use TypeSize when determining if accesses to a variable are
   considered out-of-bounds so that the behaviour is correct for
   scalable vectors.
 * When stack protection is enabled move the stack protector location
   to the top of the SVE locals, so that any overflow in them (or the
   other locals which are below that) will be detected.

Fixes: https://github.com/llvm/llvm-project/issues/51137

Differential Revision: https://reviews.llvm.org/D111631




More information about the All-commits mailing list