]>
git.proxmox.com Git - rustc.git/blob - src/compiler-rt/test/asan/TestCases/Windows/longjmp.cc
1 // RUN: %clangxx_asan -O %s -o %t && %run %t
3 // FIXME: merge this with the common longjmp test when we can run common
9 #include <sanitizer/asan_interface.h>
15 fprintf(stderr
, "\nTestLongJmp\n");
16 fprintf(stderr
, "Before: %p poisoned: %d\n", &x
,
17 __asan_address_is_poisoned(x
+ 32));
18 assert(__asan_address_is_poisoned(x
+ 32));
21 fprintf(stderr
, "After: %p poisoned: %d\n", &x
,
22 __asan_address_is_poisoned(x
+ 32));
23 // FIXME: Invert this assertion once we fix
24 // https://code.google.com/p/address-sanitizer/issues/detail?id=258
25 assert(!__asan_address_is_poisoned(x
+ 32));