diff options
author | Vedant Kumar <vsk@apple.com> | 2016-04-28 17:48:35 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2016-04-28 17:48:35 +0000 |
commit | 649203faa3438601081fa5ade1fc00d0d92bda88 (patch) | |
tree | 3899fbcd3a29848a32cc94759f40414bff417dbe | |
parent | 69881f763d2d2acd0ee58d530e2a0f72079e9e8a (diff) |
[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.)
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@267907 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/asan/TestCases/Darwin/segv_read_write.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/asan/TestCases/Darwin/segv_read_write.c b/test/asan/TestCases/Darwin/segv_read_write.c index 036fdc490..d8e2d215f 100644 --- a/test/asan/TestCases/Darwin/segv_read_write.c +++ b/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); |