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 | 6a2ec9fc57d7fb889079b91071844577bca952c7 (patch) | |
| tree | 26a7a561c76798881eef285a5eb0ef109c0d2e80 /compiler-rt/test | |
| parent | ab93394a29672c1f2daff7b920c203f8db6a5953 (diff) | |
| download | bcm5719-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.c | 2 |
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); |

