blob: 42a3fbf23f556bd091d115ef4bf52dab0efcb1d5 [file] [log] [blame]
Stephen Hines2d1fdb22014-05-28 23:58:16 -07001// Make sure we report atexit stats.
2// RUN: %clangxx_asan -O3 %s -o %t
Pirama Arumuga Nainar799172d2016-03-03 15:50:30 -08003// RUN: %env_asan_opts=atexit=1:print_stats=1 %run %t 2>&1 | FileCheck %s
Stephen Hines2d1fdb22014-05-28 23:58:16 -07004//
5// No atexit output on Android due to
6// https://code.google.com/p/address-sanitizer/issues/detail?id=263
7// XFAIL: android
8
9#include <stdlib.h>
Stephen Hines6d186232014-11-26 17:56:19 -080010#if !defined(__APPLE__) && !defined(__FreeBSD__)
Stephen Hines2d1fdb22014-05-28 23:58:16 -070011#include <malloc.h>
12#endif
13int *p1 = (int*)malloc(900);
14int *p2 = (int*)malloc(90000);
15int *p3 = (int*)malloc(9000000);
16int main() { }
17
18// CHECK: AddressSanitizer exit stats: