From: Richard Trieu Date: Fri, 10 Aug 2018 01:30:10 +0000 (+0000) Subject: Fix size calculation from r339380 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6601c8f525499269dba75f75bbd1ee2671aaa262;p=clang Fix size calculation from r339380 r339380 changed the trailing types of ParsedAttr to use llvm::TrailingObjects. However, it did not copy over one of the size attributes, causing a too small allocation for this object. The error was detected with AddressSanitizer use-after-poison git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339409 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Sema/ParsedAttr.h b/include/clang/Sema/ParsedAttr.h index 34eb59eb43..903702715c 100644 --- a/include/clang/Sema/ParsedAttr.h +++ b/include/clang/Sema/ParsedAttr.h @@ -581,7 +581,7 @@ public: TypeTagForDatatypeAllocSize = ParsedAttr::totalSizeToAlloc(0, 0, 1, 0, 0), + detail::PropertyData>(1, 0, 1, 0, 0), PropertyAllocSize = ParsedAttr::totalSizeToAlloc