tests: Disable page allocator if address sanitizer is active

Address sanitizer can detect underflows so we don't really need the custom
allocator.

Additionally, custom allocator can return memory that is not pointer-aligned;
this causes undefined behavior sanitizer to complain.
This commit is contained in:
Arseny Kapoulkine 2015-05-12 20:16:51 -07:00
parent 9f7994ed71
commit 7342c5ed8c

View file

@ -67,7 +67,7 @@ namespace
VirtualProtect(rptr, aligned_size + page_size, PAGE_NOACCESS, &old_flags);
}
}
#elif defined(__APPLE__) || defined(__linux__)
#elif (defined(__APPLE__) || defined(__linux__)) && !((defined(__has_feature) && __has_feature(address_sanitizer)) || defined(__SANITIZE_ADDRESS__))
# include <sys/mman.h>
namespace