assert(!__asan_address_is_poisoned(x + 13));
// FIXME: invert the assertion below once we fix
// https://code.google.com/p/address-sanitizer/issues/detail?id=258
- assert(!__asan_address_is_poisoned(x + 14));
+ // This assertion works only w/o UAR.
+ if (!__asan_get_current_fake_stack())
+ assert(!__asan_address_is_poisoned(x + 14));
__sanitizer_annotate_contiguous_container(x, x + 32, x + 14, x + 32);
assert(!__asan_address_is_poisoned(x + 13));
assert(!__asan_address_is_poisoned(x + 14));
__asan_address_is_poisoned(x + 32));
// FIXME: Invert this assertion once we fix
// https://code.google.com/p/address-sanitizer/issues/detail?id=258
- assert(!__asan_address_is_poisoned(x + 32));
+ // This assertion works only w/o UAR.
+ if (!__asan_get_current_fake_stack())
+ assert(!__asan_address_is_poisoned(x + 32));
}
#include <unistd.h>
#include <sys/time.h>
#include <sys/resource.h>
+#include <sanitizer/asan_interface.h>
const int BS = 1024;
volatile char x;
z13 = t13;
#else
char buf[BS];
- if (p)
+ // Check that the stack grows in the righ direction, unless we use fake stack.
+ if (p && !__asan_get_current_fake_stack())
assert(p - buf >= BS);
buf[rand() % BS] = 1;
buf[rand() % BS] = 2;
__asan_address_is_poisoned(x + 32));
// FIXME: Invert this assertion once we fix
// https://code.google.com/p/address-sanitizer/issues/detail?id=258
- assert(!__asan_address_is_poisoned(x + 32));
+ // This assertion works only w/o UAR.
+ if (!__asan_get_current_fake_stack())
+ assert(!__asan_address_is_poisoned(x + 32));
}
void TestThrowInline() {
__asan_address_is_poisoned(x + 32));
// FIXME: Invert this assertion once we fix
// https://code.google.com/p/address-sanitizer/issues/detail?id=258
- assert(!__asan_address_is_poisoned(x + 32));
+ // This assertion works only w/o UAR.
+ if (!__asan_get_current_fake_stack())
+ assert(!__asan_address_is_poisoned(x + 32));
}
int main(int argc, char **argv) {