]>
git.proxmox.com Git - rustc.git/blob - src/libcompiler_builtins/compiler-rt/test/asan/TestCases/longjmp.cc
1 // RUN: %clangxx_asan -O %s -o %t && %run %t
6 #include <sanitizer/asan_interface.h>
12 fprintf(stderr
, "\nTestLongJmp\n");
13 fprintf(stderr
, "Before: %p poisoned: %d\n", &x
,
14 __asan_address_is_poisoned(x
+ 32));
15 assert(__asan_address_is_poisoned(x
+ 32));
18 fprintf(stderr
, "After: %p poisoned: %d\n", &x
,
19 __asan_address_is_poisoned(x
+ 32));
20 // FIXME: Invert this assertion once we fix
21 // https://code.google.com/p/address-sanitizer/issues/detail?id=258
22 // This assertion works only w/o UAR.
23 if (!__asan_get_current_fake_stack())
24 assert(!__asan_address_is_poisoned(x
+ 32));