[PATCH] D114487: [LAA] Support runtime checks for select GEP base pointers.
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 2 18:15:45 PDT 2022
vitalybuka added a comment.
@fhahn
This is reduced reproducer:
struct c {
int b;
};
struct e {
int &operator*() { return ae->b; }
bool operator!=(e) __attribute__((noinline)) { return 0; }
c *ae;
};
int a;
float g;
int main() {
e b, d;
int &f = d != b ? *d : a;
for (int h = 0; h < 50; ++h)
g = f;
}
clang++ -cc1 -triple x86_64-grtev4-linux-gnu -emit-obj -mframe-pointer=non-leaf -relaxed-aliasing -mconstructor-aliases -O2 -fsanitize=memory -Werror -Wreturn-type -fsanitize-memory-use-after-dtor -fsanitize-memory-param-retval -vectorize-loops -o t.o -x c++ t.cc
clang++ t.o -fsanitize=memory -fuse-ld=lld -o t -g0 -s -Wl,--strip-all
./t
==350572==WARNING: MemorySanitizer: use-of-uninitialized-value
SUMMARY: MemorySanitizer: use-of-uninitialized-value
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114487/new/
https://reviews.llvm.org/D114487
More information about the llvm-commits
mailing list