[PATCH] D111631: [AArch64][SVE] Fix handling of stack protection with SVE

John Brawn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 13 06:40:50 PST 2021


john.brawn marked 3 inline comments as done.
john.brawn added inline comments.


================
Comment at: llvm/lib/CodeGen/StackProtector.cpp:175
     if (MemLoc.hasValue() && MemLoc->Size.hasValue() &&
-        MemLoc->Size.getValue() > AllocSize)
+        !TypeSize::isKnownGE(AllocSize,
+                             TypeSize::getFixed(MemLoc->Size.getValue())))
----------------
sdesmalen wrote:
> nit: `TypeSize::isKnownLT` ?
It needs to be a negated comparison because the TypeSize::isKnownXY functions return false for "I don't know" and in those cases we should assume the access is larger than AllocSize.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111631/new/

https://reviews.llvm.org/D111631



More information about the llvm-commits mailing list