[compiler-rt] r267907 - [test/asan] Update a test case to work with old Darwin SDK's
Vedant Kumar via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 28 10:48:35 PDT 2016
Author: vedantk
Date: Thu Apr 28 12:48:35 2016
New Revision: 267907
URL: http://llvm.org/viewvc/llvm-project?rev=267907&view=rev
Log:
[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.)
Modified:
compiler-rt/trunk/test/asan/TestCases/Darwin/segv_read_write.c
Modified: compiler-rt/trunk/test/asan/TestCases/Darwin/segv_read_write.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/segv_read_write.c?rev=267907&r1=267906&r2=267907&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/segv_read_write.c (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/segv_read_write.c Thu Apr 28 12:48:35 2016
@@ -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);
More information about the llvm-commits
mailing list