[asan] poison array cookies only on 64-bit arch

llvm-svn: 214713
This commit is contained in:
Kostya Serebryany 2014-08-04 12:59:45 +00:00
parent 2c590ffa0e
commit e9f24a9b3b
1 changed files with 1 additions and 0 deletions

View File

@ -229,6 +229,7 @@ void __sanitizer_unaligned_store64(uu64 *p, u64 x) {
extern "C" SANITIZER_INTERFACE_ATTRIBUTE
void __asan_poison_cxx_array_cookie(uptr p) {
if (SANITIZER_WORDSIZE != 64) return;
if (!flags()->poison_array_cookie) return;
uptr s = MEM_TO_SHADOW(p);
*reinterpret_cast<u8*>(s) = 0xac;