[ASan/Win] Use the new function interception approach to handle function wrappers...
[blocksruntime.git] / test / asan / TestCases / inline.cc
blobdaeb7b49eb22ad08e7485e8760faf303f886420e
1 // RUN: %clangxx_asan -O3 %s -o %t && %run %t
3 // Test that no_sanitize_address attribute applies even when the function would
4 // be normally inlined.
6 #include <stdlib.h>
8 __attribute__((no_sanitize_address))
9 int f(int *p) {
10 return *p; // BOOOM?? Nope!
13 int main(int argc, char **argv) {
14 int * volatile x = (int*)malloc(2*sizeof(int) + 2);
15 int res = f(x + 2);
16 if (res)
17 exit(0);
18 return 0;