]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/asan/TestCases/Posix/handle_abort_on_error.cc
Vendor import of compiler-rt trunk r351319 (just before the release_80
[FreeBSD/FreeBSD.git] / test / asan / TestCases / Posix / handle_abort_on_error.cc
1 // Regression test: this used to abort() in SIGABRT handler in an infinite loop.
2 // RUN: %clangxx_asan -O0 %s -o %t && %env_asan_opts=handle_abort=1,abort_on_error=1 not --crash %run %t 2>&1 | FileCheck %s
3
4 // UNSUPPORTED: ios
5
6 #include <stdlib.h>
7
8 int main() {
9   abort();
10   // CHECK: ERROR: AddressSanitizer: ABRT
11 }