Files
clang-p2996/compiler-rt/test/asan/TestCases/report_error_summary.cpp
Vitaly Buka a8cd84d328 [test][asan] Fix test on MacOS 12+
Reviewed By: rsundahl

Differential Revision: https://reviews.llvm.org/D145810
2023-03-12 19:58:49 -07:00

24 lines
490 B
C++

// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
// FIXME: Doesn't work with DLLs
// XFAIL: win32-dynamic-asan
#include <stdio.h>
// Required for ld64 macOS 12.0+
__attribute__((weak)) extern "C" void foo() {}
extern "C" void __sanitizer_report_error_summary(const char *summary) {
fprintf(stderr, "test_report_error_summary\n");
// CHECK: test_report_error_summary
fflush(stderr);
}
char *x;
int main() {
x = new char[20];
delete[] x;
return x[0];
}