summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2016-04-28 17:48:35 +0000
committerVedant Kumar <vsk@apple.com>2016-04-28 17:48:35 +0000
commit6a2ec9fc57d7fb889079b91071844577bca952c7 (patch)
tree26a7a561c76798881eef285a5eb0ef109c0d2e80 /compiler-rt/test
parentab93394a29672c1f2daff7b920c203f8db6a5953 (diff)
downloadbcm5719-llvm-6a2ec9fc57d7fb889079b91071844577bca952c7.tar.gz
bcm5719-llvm-6a2ec9fc57d7fb889079b91071844577bca952c7.zip
[test/asan] Update a test case to work with old Darwin SDK's
On Darwin, MAP_ANONYMOUS is a synonym for MAP_ANON. However, some SDK's don't define MAP_ANONYMOUS. Use MAP_ANON to work around this. (As a point of interest, the situation is exactly reversed on Linux.) llvm-svn: 267907
Diffstat (limited to 'compiler-rt/test')
-rw-r--r--compiler-rt/test/asan/TestCases/Darwin/segv_read_write.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler-rt/test/asan/TestCases/Darwin/segv_read_write.c b/compiler-rt/test/asan/TestCases/Darwin/segv_read_write.c
index 036fdc490b9..d8e2d215f83 100644
--- a/compiler-rt/test/asan/TestCases/Darwin/segv_read_write.c
+++ b/compiler-rt/test/asan/TestCases/Darwin/segv_read_write.c
@@ -13,7 +13,7 @@ int main(int argc, char **argv) {
// shadow mapping works). This is kinda hard to fix. Test a random address in
// the application part of the address space.
void *volatile p =
- mmap(nullptr, 4096, PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
+ mmap(nullptr, 4096, PROT_READ, MAP_PRIVATE | MAP_ANON, 0, 0);
munmap(p, 4096);
if (argc == 1)
Read((int *)p);
OpenPOWER on IntegriCloud