[PATCH] D117285: [msan] Copy origin of byval arguments
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 14 12:40:46 PST 2022
eugenis accepted this revision.
eugenis added a comment.
This revision is now accepted and ready to land.
LGTM
A compiler-rt test for origin propagation would be great.
================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:1741
+ getOriginPtrForArgument(&FArg, EntryIRB, ArgOffset);
+ EntryIRB.CreateMemCpy(CpOriginPtr, CopyAlign, OriginPtr,
+ CopyAlign, Size);
----------------
This can get weird if the byval pointer is less than 4 byte aligned, but the alternatives are not pretty, either.
Also, you can bump the alignment `std::max(CopyAlign, kMinOriginAlignment)`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117285/new/
https://reviews.llvm.org/D117285
More information about the llvm-commits
mailing list