1 // RUN: %clangxx_asan -O0 %s -o %t && %run %t 2>&1 | FileCheck %s
3 #include <sanitizer/asan_interface.h>
7 int main(int argc
, char *argv
[]) {
9 int *heap
= new int[100];
10 __asan_describe_address(heap
);
11 // CHECK: {{.*}} is located 0 bytes inside of 400-byte region
12 // CHECK: allocated by thread T{{.*}} here
13 __asan_describe_address(&stack
);
14 // CHECK: Address {{.*}} is located in stack of thread T{{.*}} at offset {{.*}}
15 __asan_describe_address(&global
);
16 // CHECK: {{.*}} is located 0 bytes inside of global variable '{{.*}}global{{.*}}'