]> granicus.if.org Git - clang/commit
Do not insert asan paddings after fields that have flexible arrays.
authorKostya Serebryany <kcc@google.com>
Mon, 27 Oct 2014 19:34:10 +0000 (19:34 +0000)
committerKostya Serebryany <kcc@google.com>
Mon, 27 Oct 2014 19:34:10 +0000 (19:34 +0000)
commitdabcb7e52af8e36a7e78f3f07de12db33a164c6f
tree2804d6ceb995dedf57b050bb272f4ca884b98a57
parent3b10ac09cfbcba2dee930e29f12754e7b36c25af
Do not insert asan paddings after fields that have flexible arrays.

Summary:
We should avoid a tail padding not only if the last field
has zero size but also if the last field is a struct with a flexible array.

If/when http://reviews.llvm.org/D5478 is committed,
this will also handle the case of structs with zero-sized arrays.

Reviewers: majnemer, rsmith

Reviewed By: rsmith

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D5924

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220708 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/RecordLayoutBuilder.cpp
test/CodeGen/sanitize-address-field-padding.cpp