forked from OSchip/llvm-project
parent
341770d7ea
commit
fd078b9405
|
@ -1,7 +1,7 @@
|
|||
// Test for ScopedDisabler.
|
||||
// RUN: LSAN_BASE="report_objects=1:use_registers=0:use_stacks=0:use_globals=0:use_tls=0"
|
||||
// RUN: %clangxx_lsan %s -o %t
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE %t 2>&1 | FileCheck %s
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE not %t 2>&1 | FileCheck %s
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
// "normal" mode (LSan runs in "strict" mode by default).
|
||||
// RUN: LSAN_BASE="use_stacks=0:use_registers=0"
|
||||
// RUN: %clangxx_lsan %s -o %t
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE %t 2>&1 | FileCheck --check-prefix=CHECK-strict %s
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE %t foo 2>&1 | FileCheck --check-prefix=CHECK-normal %s
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE not %t 2>&1 | FileCheck --check-prefix=CHECK-strict %s
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE not %t foo 2>&1 | FileCheck --check-prefix=CHECK-normal %s
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Test for __lsan_ignore_object().
|
||||
// RUN: LSAN_BASE="report_objects=1:use_registers=0:use_stacks=0:use_globals=0:use_tls=0:verbosity=3"
|
||||
// RUN: %clangxx_lsan %s -o %t
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE %t 2>&1 | FileCheck %s
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE not %t 2>&1 | FileCheck %s
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Test that LargeMmapAllocator's chunks aren't reachable via some internal data structure.
|
||||
// RUN: LSAN_BASE="report_objects=1:use_stacks=0:use_registers=0"
|
||||
// RUN: %clangxx_lsan %s -o %t
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE %t 2>&1 | FileCheck %s
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE not %t 2>&1 | FileCheck %s
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// RUN: LSAN_BASE="use_stacks=0:use_registers=0"
|
||||
// RUN: %clangxx_lsan %s -o %t
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE %t
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE %t foo 2>&1 | FileCheck %s
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE not %t foo 2>&1 | FileCheck %s
|
||||
|
||||
#include <sanitizer/lsan_interface.h>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Test that out-of-scope local variables are ignored by LSan.
|
||||
// RUN: LSAN_BASE="report_objects=1:use_registers=0:use_stacks=1"
|
||||
// RUN: %clangxx_lsan %s -o %t
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE %t 2>&1 | FileCheck %s
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE not %t 2>&1 | FileCheck %s
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE":exitcode=0" %t 2>&1 | FileCheck --check-prefix=CHECK-sanity %s
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Test for ScopedDisabler.
|
||||
// RUN: LSAN_BASE="use_registers=0:use_stacks=0"
|
||||
// RUN: %clangxx_lsan %s -o %t
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE %t 2>&1 | FileCheck %s
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE not %t 2>&1 | FileCheck %s
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Test for ScopedDisabler.
|
||||
// RUN: LSAN_BASE="use_registers=0:use_stacks=0"
|
||||
// RUN: %clangxx_lsan %s -o %t
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE %t 2>&1 | FileCheck %s
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE not %t 2>&1 | FileCheck %s
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Test that initialized globals are included in the root set.
|
||||
// RUN: LSAN_BASE="report_objects=1:use_stacks=0:use_registers=0"
|
||||
// RUN: %clangxx_lsan %s -o %t
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_globals=0" %t 2>&1 | FileCheck %s
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_globals=0" not %t 2>&1 | FileCheck %s
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_globals=1" %t 2>&1
|
||||
// RUN: LSAN_OPTIONS="" %t 2>&1
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Test that uninitialized globals are included in the root set.
|
||||
// RUN: LSAN_BASE="report_objects=1:use_stacks=0:use_registers=0"
|
||||
// RUN: %clangxx_lsan %s -o %t
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_globals=0" %t 2>&1 | FileCheck %s
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_globals=0" not %t 2>&1 | FileCheck %s
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_globals=1" %t 2>&1
|
||||
// RUN: LSAN_OPTIONS="" %t 2>&1
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Test that registers of running threads are included in the root set.
|
||||
// RUN: LSAN_BASE="report_objects=1:use_stacks=0"
|
||||
// RUN: %clangxx_lsan -pthread %s -o %t
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_registers=0" %t 2>&1 | FileCheck %s
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_registers=0" not %t 2>&1 | FileCheck %s
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_registers=1" %t 2>&1
|
||||
// RUN: LSAN_OPTIONS="" %t 2>&1
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Test that stack of main thread is included in the root set.
|
||||
// RUN: LSAN_BASE="report_objects=1:use_registers=0"
|
||||
// RUN: %clangxx_lsan %s -o %t
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_stacks=0" %t 2>&1 | FileCheck %s
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_stacks=0" not %t 2>&1 | FileCheck %s
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_stacks=1" %t 2>&1
|
||||
// RUN: LSAN_OPTIONS="" %t 2>&1
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Test that stacks of non-main threads are included in the root set.
|
||||
// RUN: LSAN_BASE="report_objects=1:use_registers=0"
|
||||
// RUN: %clangxx_lsan -pthread %s -o %t
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_stacks=0" %t 2>&1 | FileCheck %s
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_stacks=0" not %t 2>&1 | FileCheck %s
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_stacks=1" %t 2>&1
|
||||
// RUN: LSAN_OPTIONS="" %t 2>&1
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// RUN: LSAN_BASE="report_objects=1:use_stacks=0:use_registers=0"
|
||||
// RUN: %clangxx %p/SharedLibs/huge_tls_lib_so.cc -fPIC -shared -o %t-so.so
|
||||
// RUN: %clangxx_lsan %s -o %t
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=0" %t 2>&1 | FileCheck %s
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=0" not %t 2>&1 | FileCheck %s
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=1" %t 2>&1
|
||||
// RUN: LSAN_OPTIONS="" %t 2>&1
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Test that dynamically allocated thread-specific storage is included in the root set.
|
||||
// RUN: LSAN_BASE="report_objects=1:use_stacks=0:use_registers=0"
|
||||
// RUN: %clangxx_lsan %s -o %t
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=0" %t 2>&1 | FileCheck %s
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=0" not %t 2>&1 | FileCheck %s
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=1" %t 2>&1
|
||||
// RUN: LSAN_OPTIONS="" %t 2>&1
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Test that statically allocated thread-specific storage is included in the root set.
|
||||
// RUN: LSAN_BASE="report_objects=1:use_stacks=0:use_registers=0"
|
||||
// RUN: %clangxx_lsan %s -o %t
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=0" %t 2>&1 | FileCheck %s
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=0" not %t 2>&1 | FileCheck %s
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=1" %t 2>&1
|
||||
// RUN: LSAN_OPTIONS="" %t 2>&1
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Test that statically allocated TLS space is included in the root set.
|
||||
// RUN: LSAN_BASE="report_objects=1:use_stacks=0:use_registers=0"
|
||||
// RUN: %clangxx_lsan %s -o %t
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=0" %t 2>&1 | FileCheck %s
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=0" not %t 2>&1 | FileCheck %s
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=1" %t 2>&1
|
||||
// RUN: LSAN_OPTIONS="" %t 2>&1
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Test that unaligned pointers are detected correctly.
|
||||
// RUN: LSAN_BASE="report_objects=1:use_stacks=0:use_registers=0"
|
||||
// RUN: %clangxx_lsan %s -o %t
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_unaligned=0" %t 2>&1 | FileCheck %s
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_unaligned=0" not %t 2>&1 | FileCheck %s
|
||||
// RUN: LSAN_OPTIONS=$LSAN_BASE:"use_unaligned=1" %t 2>&1
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -31,4 +31,3 @@ if config.host_os not in ['Linux'] or config.host_arch not in ['x86_64']:
|
|||
config.unsupported = True
|
||||
|
||||
config.suffixes = ['.c', '.cc', '.cpp']
|
||||
config.pipefail = False
|
||||
|
|
Loading…
Reference in New Issue