[PATCH] D121629: clang: also check alloc_alignment claims in return
Augie Fackler via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 14 11:14:29 PDT 2022
durin42 created this revision.
Herald added a project: All.
durin42 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Prior to this patch, we only check alloc_alignment claims in the caller.
I'm about to add some extra logic that threads alloc_alignment
information down into LLVM, which would then have a chance to defeat the
sanitizer checks by performing optimizations. To avoid that, we also
check alignment claims in the called function prior to return.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D121629
Files:
clang/lib/CodeGen/CGCall.cpp
clang/lib/CodeGen/CodeGenFunction.cpp
clang/test/CodeGen/catch-alignment-assumption-attribute-alloc_align-on-function-variable.cpp
clang/test/CodeGen/catch-alignment-assumption-attribute-alloc_align-on-function.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121629.415168.patch
Type: text/x-patch
Size: 9559 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220314/7a0f8c71/attachment-0001.bin>
More information about the cfe-commits
mailing list