diff options
-rw-r--r-- | compiler-rt/lib/asan/asan_rtl.cc | 2 | ||||
-rw-r--r-- | compiler-rt/test/asan/TestCases/Linux/new_array_cookie_test.cc | 4 | ||||
-rw-r--r-- | compiler-rt/test/asan/TestCases/Linux/new_array_cookie_uaf_test.cc | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/compiler-rt/lib/asan/asan_rtl.cc b/compiler-rt/lib/asan/asan_rtl.cc index d9874016f57..c3cc1d3f333 100644 --- a/compiler-rt/lib/asan/asan_rtl.cc +++ b/compiler-rt/lib/asan/asan_rtl.cc @@ -269,7 +269,7 @@ void InitializeFlags(Flags *f, const char *env) { 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 diff --git a/compiler-rt/test/asan/TestCases/Linux/new_array_cookie_test.cc b/compiler-rt/test/asan/TestCases/Linux/new_array_cookie_test.cc index 49545f09355..eb0314cc152 100644 --- a/compiler-rt/test/asan/TestCases/Linux/new_array_cookie_test.cc +++ b/compiler-rt/test/asan/TestCases/Linux/new_array_cookie_test.cc @@ -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; diff --git a/compiler-rt/test/asan/TestCases/Linux/new_array_cookie_uaf_test.cc b/compiler-rt/test/asan/TestCases/Linux/new_array_cookie_uaf_test.cc index 5d6379471c5..fee44217245 100644 --- a/compiler-rt/test/asan/TestCases/Linux/new_array_cookie_uaf_test.cc +++ b/compiler-rt/test/asan/TestCases/Linux/new_array_cookie_uaf_test.cc @@ -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> |