[PATCH] D22714: stop short-circuiting the SSP code for sspstrong

Daniel Micay via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 9 15:18:09 PDT 2016


strcat updated this revision to Diff 67422.

https://reviews.llvm.org/D22714

Files:
  lib/CodeGen/StackProtector.cpp

Index: lib/CodeGen/StackProtector.cpp
===================================================================
--- lib/CodeGen/StackProtector.cpp
+++ lib/CodeGen/StackProtector.cpp
@@ -236,6 +236,11 @@
     for (const Instruction &I : BB) {
       if (const AllocaInst *AI = dyn_cast<AllocaInst>(&I)) {
         if (AI->isArrayAllocation()) {
+          // SSP-Strong: Enable protectors for any call to alloca, regardless
+          // of size.
+          if (Strong)
+            return true;
+
           if (const auto *CI = dyn_cast<ConstantInt>(AI->getArraySize())) {
             if (CI->getLimitedValue(SSPBufferSize) >= SSPBufferSize) {
               // A call to alloca with size >= SSPBufferSize requires


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22714.67422.patch
Type: text/x-patch
Size: 711 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160809/66f33742/attachment.bin>


More information about the llvm-commits mailing list