Kostya Serebryany | a2e70d9 | 2013-10-18 07:57:59 +0000 | [diff] [blame] | 1 | // Make sure we report atexit stats. |
| 2 | // RUN: %clangxx_asan -O3 %s -o %t |
| 3 | // RUN: ASAN_OPTIONS=atexit=1:print_stats=1 %t 2>&1 | FileCheck %s |
| 4 | #include <stdlib.h> |
Alexander Potapenko | 34fb715 | 2013-10-18 14:12:15 +0000 | [diff] [blame^] | 5 | #if !defined(__APPLE__) |
Kostya Serebryany | a2e70d9 | 2013-10-18 07:57:59 +0000 | [diff] [blame] | 6 | #include <malloc.h> |
Alexander Potapenko | 34fb715 | 2013-10-18 14:12:15 +0000 | [diff] [blame^] | 7 | #endif |
Kostya Serebryany | a2e70d9 | 2013-10-18 07:57:59 +0000 | [diff] [blame] | 8 | int *p1 = (int*)malloc(900); |
| 9 | int *p2 = (int*)malloc(90000); |
| 10 | int *p3 = (int*)malloc(9000000); |
| 11 | int main() { } |
| 12 | |
| 13 | // CHECK: AddressSanitizer exit stats: |