mirror of
https://github.com/intel/llvm.git
synced 2026-02-08 17:28:30 +08:00
[asan] enable poison_array_cookie back
llvm-svn: 216705
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user