[PATCH] D15002: [safestack] Fix handling of array allocas.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 25 17:00:48 PST 2015


pcc added inline comments.

================
Comment at: lib/Transforms/Instrumentation/SafeStack.cpp:185
@@ +184,3 @@
+  if (AI->isArrayAllocation()) {
+    auto C = dyn_cast<ConstantInt>(AI->getArraySize());
+    Size *= C->getZExtValue();
----------------
`AI` can be a dynamic alloca at this point, I believe (see findInsts -> IsSafeStackAlloca -> IsAccessSafe -> getStaticAllocaAllocationSize), so this may not be a constant.


Repository:
  rL LLVM

http://reviews.llvm.org/D15002





More information about the llvm-commits mailing list