[ASan] Get fake stack code working with GCC 4.8.2.
authorJay Foad <jay.foad@gmail.com>
Fri, 21 Nov 2014 21:25:09 +0000 (21:25 +0000)
committerJay Foad <jay.foad@gmail.com>
Fri, 21 Nov 2014 21:25:09 +0000 (21:25 +0000)
commite47130e407883f17af82bba9889c56453f537856
tree5ff40d75fb0b86549cd574d987ae0fa73ac767ea
parente88447d8deb5e58e51db76733a9c92c68e4fe142
[ASan] Get fake stack code working with GCC 4.8.2.

Summary:
TestCases/Linux/heavy_uar_test.cc was failing on my
PowerPC64 box with GCC 4.8.2, because the compiler recognised
a memset-like loop and turned it into a call to memset, which
got intercepted by __asan_memset, which got upset because it was
being called on an address in high shadow memory.

Use break_optimization to stop the compiler from doing this.

Reviewers: kcc, samsonov

Reviewed By: kcc

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6266

llvm-svn: 222572
compiler-rt/lib/asan/asan_fake_stack.cc
compiler-rt/lib/sanitizer_common/sanitizer_common.h
compiler-rt/lib/sanitizer_common/sanitizer_libc.cc