| 1 |
// Check that sanitizers call _exit() on Linux by default (i.e. |
| 2 |
// abort_on_error=0). See also Darwin/abort_on_error.cpp. |
| 3 |
|
| 4 |
// RUN: %clangxx %s -o %t |
| 5 |
|
| 6 |
// Intentionally don't inherit the default options. |
| 7 |
// RUN: env %tool_options='' not %run %t 2>&1 |
| 8 |
|
| 9 |
// When we use lit's default options, we shouldn't crash either. On Linux |
| 10 |
// lit doesn't set options anyway. |
| 11 |
// RUN: not %run %t 2>&1 |
| 12 |
|
| 13 |
// Android needs abort_on_error=0 |
| 14 |
// UNSUPPORTED: android |
| 15 |
|
| 16 |
namespace __sanitizer { |
| 17 |
void Die(); |
| 18 |
} |
| 19 |
|
| 20 |
int main() { |
| 21 |
__sanitizer::Die(); |
| 22 |
return 0; |
| 23 |
} |