[PATCH] D16857: More detailed memory dependence checking between volatile and non-volatile accesses

Krzysztof Parzyszek via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 24 10:12:21 PST 2016

kparzysz added a comment.

GVN removes the load and replaces the uses of it with "undef".  I guess the only certain way to keep the load is to make the array volatile:

  void AsanHeapOverflow() {
    scoped_ptr<volatile int[]> array(new int[kArraySize]);
    int dummy = array[kArraySize];

I'm not sure what the last line does so my example does not include it.



More information about the llvm-commits mailing list