[PATCH] D95734: Use alias analysis to remove redundant instrumentation for Asan
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 2 16:19:33 PST 2021
eugenis added a comment.
this is good start, but you need to take dominator tree into account, otherwise you can miss a bug.
See this example:
#include <string.h>
#include <stdio.h>
int x;
__attribute__((noinline)) void f(bool store, int *p, int source, int &sink) {
if (store)
*p = source;
else
sink = *p;
}
int main(int argc, char **argv) {
if (argc < 2) return 1;
int * volatile p = new int;
if (strcmp(argv[1], "store") == 0)
f(true, p + 1, argc, x);
else if (strcmp(argv[1], "load") == 0)
f(false, p + 1, argc, x);
else
return 1;
}
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95734/new/
https://reviews.llvm.org/D95734
More information about the llvm-commits
mailing list