[ASan] Disable back init-order checker. Make strict_init_order imply check_initialization_order

llvm-svn: 194125
This commit is contained in:
Alexey Samsonov 2013-11-06 04:27:09 +00:00
parent c628af66c7
commit fead612a02
5 changed files with 12 additions and 8 deletions

View File

@ -148,7 +148,7 @@ void InitializeFlags(Flags *f, const char *env) {
f->redzone = 16;
f->debug = false;
f->report_globals = 1;
f->check_initialization_order = true;
f->check_initialization_order = false;
f->replace_str = true;
f->replace_intrin = true;
f->mac_ignore_invalid_free = false;
@ -199,6 +199,12 @@ void InitializeFlags(Flags *f, const char *env) {
cf->detect_leaks = false;
}
#endif
// Make "strict_init_order" imply "check_initialization_order".
// TODO(samsonov): Use a single runtime flag for an init-order checker.
if (f->strict_init_order) {
f->check_initialization_order = true;
}
}
// -------------------------- Globals --------------------- {{{1

View File

@ -4,11 +4,9 @@
// strict init-order checking).
// RUN: %clangxx_asan -O0 %s %p/../Helpers/initialization-bug-extra.cc -o %t
// RUN: ASAN_OPTIONS=check_initialization_order=true:strict_init_order=true not %t 2>&1 \
// RUN: | FileCheck %s
// RUN: ASAN_OPTIONS=strict_init_order=true not %t 2>&1 | FileCheck %s
// RUN: %clangxx_asan -O0 %p/../Helpers/initialization-bug-extra.cc %s -o %t
// RUN: ASAN_OPTIONS=check_initialization_order=true:strict_init_order=true not %t 2>&1 \
// RUN: | FileCheck %s
// RUN: ASAN_OPTIONS=strict_init_order=true not %t 2>&1 | FileCheck %s
// Do not test with optimization -- the error may be optimized away.

View File

@ -5,7 +5,7 @@
// We do *not* want to report init-order bug in this case.
// RUN: %clangxx_asan -O0 %s %p/Helpers/init-order-atexit-extra.cc -o %t
// RUN: ASAN_OPTIONS=check_initialization_order=true:strict_init_order=true not %t 2>&1 | FileCheck %s
// RUN: ASAN_OPTIONS=strict_init_order=true not %t 2>&1 | FileCheck %s
#include <stdio.h>
#include <stdlib.h>

View File

@ -12,7 +12,7 @@
// FIXME: find a better solution.
// RUN: %clangxx_asan -O0 %s -o %t -Wl,--export-dynamic || \
// RUN: %clangxx_asan -O0 %s -o %t
// RUN: ASAN_OPTIONS=check_initialization_order=true:strict_init_order=true %t 2>&1 | FileCheck %s
// RUN: ASAN_OPTIONS=strict_init_order=true %t 2>&1 | FileCheck %s
#include <dlfcn.h>
#include <pthread.h>
#include <stdio.h>

View File

@ -2,7 +2,7 @@
// called.
// RUN: %clangxx_asan %s %p/Helpers/init-order-pthread-create-extra.cc -o %t
// RUN: ASAN_OPTIONS=check_initialization_order=true:strict_init_order=true %t
// RUN: ASAN_OPTIONS=strict_init_order=true %t
#include <stdio.h>
#include <pthread.h>