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

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 25 18:12:57 PST 2015


Lgtm

On November 25, 2015 5:12:56 PM PST, Evgeniy Stepanov <eugenis at google.com> wrote:
>eugenis added inline comments.
>
>================
>Comment at: lib/Transforms/Instrumentation/SafeStack.cpp:187
>@@ +186,3 @@
>+  if (AI->isArrayAllocation()) {
>+    auto C = dyn_cast<ConstantInt>(AI->getArraySize());
>+    if (!C)
>----------------
>eugenis wrote:
>> Right. Returning 0 for unknown size allocas.
>This would check such allocas for safety as if they are size 0, i.e.
>some operations are still allowed, but not any loads or stores.
>We could actually do better by passing down the size as a Value and
>applying the SCEV magic to it. But (a) one thing at a time and (b) I
>doubt it actually matters.
>
>
>Repository:
>  rL LLVM
>
>http://reviews.llvm.org/D15002

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151125/9590719f/attachment.html>


More information about the llvm-commits mailing list