[PATCH] Implement variable-sized alloca instrumentation.
Yury Gribov
tetra2005 at gmail.com
Thu Nov 6 13:45:11 PST 2014
================
Comment at: lib/Transforms/Instrumentation/AddressSanitizer.cpp:547
@@ +546,3 @@
+
+ void handleDynamicAllocaCall(AllocaInst *AI) {
+ IRBuilder<> IRBefore(AI);
----------------
kcc wrote:
> This will not create a left red zone, right?
> And even if it will (due to alignment) it will not poison it.
>
> I would prefer to create both left and right redzones and [un]poison them inline with one 4-byte store for the left rz and one or two 4-byte stores for the right one.
> Make sure to make the new size 0 mod 32
>
>
I think Max's idea was to create thricely left, right and partial. As for inlining, it would be a mess for partial redzone - it's size is unknown until runtime so we won't be able to use 4-byte stores and will have to use an ugly loop instead.
http://reviews.llvm.org/D6055
More information about the llvm-commits
mailing list