summaryrefslogtreecommitdiff
path: root/test/asan/TestCases/atexit_stats.cc
blob: eaa1beb47d8943b9b974d7aba96d1e7f667a104e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Make sure we report atexit stats.
// RUN: %clangxx_asan -O3 %s -o %t
// RUN: ASAN_OPTIONS=atexit=1:print_stats=1 %t 2>&1 | FileCheck %s
//
// No atexit output on Android due to
// https://code.google.com/p/address-sanitizer/issues/detail?id=263
// XFAIL: android

#include <stdlib.h>
#if !defined(__APPLE__)
#include <malloc.h>
#endif
int *p1 = (int*)malloc(900);
int *p2 = (int*)malloc(90000);
int *p3 = (int*)malloc(9000000);
int main() { }

// CHECK: AddressSanitizer exit stats: