1 // Check that sanitizers on OS X crash the process by default (i.e.
2 // abort_on_error=1). See also Linux/abort_on_error.cpp.
4 // RUN: %clangxx -DUSING_%tool_name %s -o %t
6 // Intentionally don't inherit the default options.
7 // RUN: env %tool_options='' TSAN_OPTIONS=ignore_interceptors_accesses=0 not --crash %run %t 2>&1
9 // When we use lit's default options, we shouldn't crash.
10 // RUN: not %run %t 2>&1
12 // Leak detection isn't treated as an error so `abort_on_error=1` doesn't work.
18 #if defined(USING_ubsan)
19 volatile int *null
= 0;
22 volatile int *a
= new int[100];
24 global
= a
[0]; // use-after-free: triggers ASan/TSan report.