1// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
2
3// FIXME: Doesn't work with DLLs
4// XFAIL: win32-dynamic-asan
5
6#include <stdio.h>
7
8// Required for ld64 macOS 12.0+
9__attribute__((weak)) extern "C" void foo() {}
10
11extern "C" void __sanitizer_report_error_summary(const char *summary) {
12 fprintf(stderr, format: "test_report_error_summary\n");
13 // CHECK: test_report_error_summary
14 fflush(stderr);
15}
16
17char *x;
18
19int main() {
20 x = new char[20];
21 delete[] x;
22 return x[0];
23}
24

source code of compiler-rt/test/asan/TestCases/report_error_summary.cpp