[PATCH] D81699: MemorySanitizer: Add option to insert init checks at call site
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 13 15:54:06 PDT 2020
eugenis accepted this revision.
eugenis added a comment.
LGTM with a nit
================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:3420
+ continue;
+ } else if (ByVal) {
+ // ByVal requires some special handling as it's too big for a single
----------------
Remove "else".
================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:3528
Value *ShadowPtr = getShadowPtrForRetval(RetVal, IRB);
- if (CheckReturnValue) {
+ bool GlobalChecks =
+ ClEagerChecks &&
----------------
This logic is a bit confusing.
Maybe move the "main" check into this function, and express it as
bool EagerCheck = ((ClEagerChecks && hasAttribute) || (name == "main"));
bool StoreShadow = !(ClEagerChecks && hasAttribute);
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81699/new/
https://reviews.llvm.org/D81699
More information about the llvm-commits
mailing list