[PATCH] D16857: More detailed memory dependence checking between volatile and non-volatile accesses
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 24 09:19:14 PST 2016
thakis added a subscriber: thakis.
thakis added a comment.
Hi,
in Chromium we have this snippet to force a heap overflow (to test asan instrumentation):
62 void AsanHeapOverflow() {
63 scoped_ptr<int[]> array(new int[kArraySize]);
64 // Declares the dummy value as volatile to make sure it doesn't get optimized
65 // away.
66 int volatile dummy = 0;
67 dummy = array[kArraySize];
68 base::debug::Alias(const_cast<int*>(&dummy));
69 }
This now no longer does an invalid write. I'm guessing this is an expected consequence of this change – what's the new way to express this?
Repository:
rL LLVM
http://reviews.llvm.org/D16857
More information about the llvm-commits
mailing list