summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-05-12 20:16:51 -0700
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-05-12 20:16:51 -0700
commit7342c5ed8c95cc25241b45e91a98b4048c12fe6a (patch)
tree9e46d67dc31d3105b81628c4faace11b1f245468 /tests
parent9f7994ed714e6a4ffff3959092b9720ca77de77f (diff)
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/allocator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/allocator.cpp b/tests/allocator.cpp
index e1d99d5..a2bcb48 100644
--- a/tests/allocator.cpp
+++ b/tests/allocator.cpp
@@ -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