[PATCH] Do not insert asan paddings after fields that have flexible arrays.
Kostya Serebryany
kcc at google.com
Thu Oct 23 11:06:53 PDT 2014
Changed the patch so that it does not check the field size any more,
but only relies on hasFlexibleArrayMember().
Now the loop iterating over the fields actually knows which element is the last one.
This way we will avoid instrumenting flexible arrays and structs that contain those.
Combined with the David's patch http://reviews.llvm.org/D5478
this will automatically handle cases like
struct S {int Array[0]; }
and
struct S {int Array[1]; }
as well as the cases where S is the last field of another struct.
PTAL
http://reviews.llvm.org/D5924
Files:
lib/AST/RecordLayoutBuilder.cpp
test/CodeGen/sanitize-address-field-padding.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5924.15338.patch
Type: text/x-patch
Size: 2428 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141023/17eff46f/attachment.bin>
More information about the cfe-commits
mailing list