[compiler-rt] r216705 - [asan] enable poison_array_cookie back
Kostya Serebryany
kcc at google.com
Thu Aug 28 18:16:18 PDT 2014
Author: kcc
Date: Thu Aug 28 20:16:18 2014
New Revision: 216705
URL: http://llvm.org/viewvc/llvm-project?rev=216705&view=rev
Log:
[asan] enable poison_array_cookie back
Modified:
compiler-rt/trunk/lib/asan/asan_rtl.cc
compiler-rt/trunk/test/asan/TestCases/Linux/new_array_cookie_test.cc
compiler-rt/trunk/test/asan/TestCases/Linux/new_array_cookie_uaf_test.cc
Modified: compiler-rt/trunk/lib/asan/asan_rtl.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_rtl.cc?rev=216705&r1=216704&r2=216705&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_rtl.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_rtl.cc Thu Aug 28 20:16:18 2014
@@ -269,7 +269,7 @@ void InitializeFlags(Flags *f, const cha
f->allow_reexec = true;
f->print_full_thread_history = true;
f->poison_heap = true;
- f->poison_array_cookie = false;
+ f->poison_array_cookie = true;
f->poison_partial = true;
// Turn off alloc/dealloc mismatch checker on Mac and Windows for now.
// https://code.google.com/p/address-sanitizer/issues/detail?id=131
Modified: compiler-rt/trunk/test/asan/TestCases/Linux/new_array_cookie_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/new_array_cookie_test.cc?rev=216705&r1=216704&r2=216705&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/new_array_cookie_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/new_array_cookie_test.cc Thu Aug 28 20:16:18 2014
@@ -1,8 +1,8 @@
// REQUIRES: asan-64-bits
// RUN: %clangxx_asan -O3 %s -o %t
-// RUN %run %t
+// RUN: not %run %t 2>&1 | FileCheck %s
// RUN: ASAN_OPTIONS=poison_array_cookie=1 not %run %t 2>&1 | FileCheck %s
-// RUN: ASAN_OPTIONS=poison_array_cookie=0 %run %t
+// RUN: ASAN_OPTIONS=poison_array_cookie=0 %run %t
#include <stdio.h>
struct C {
int x;
Modified: compiler-rt/trunk/test/asan/TestCases/Linux/new_array_cookie_uaf_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/new_array_cookie_uaf_test.cc?rev=216705&r1=216704&r2=216705&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/new_array_cookie_uaf_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/new_array_cookie_uaf_test.cc Thu Aug 28 20:16:18 2014
@@ -1,6 +1,6 @@
// REQUIRES: asan-64-bits
// RUN: %clangxx_asan -O3 %s -o %t
-// DISABLED: ASAN_OPTIONS=poison_array_cookie=1 not %run %t 2>&1 | FileCheck %s --check-prefix=COOKIE
+// RUN: ASAN_OPTIONS=poison_array_cookie=1 not %run %t 2>&1 | FileCheck %s --check-prefix=COOKIE
// RUN: ASAN_OPTIONS=poison_array_cookie=0 not %run %t 2>&1 | FileCheck %s --check-prefix=NO_COOKIE
#include <stdio.h>
#include <stdlib.h>
More information about the llvm-commits
mailing list