[compiler-rt] r225688 - [Msan] Fix use of mmap(MAP_ANONYMOUS) in the unit tests on FreeBSD
Viktor Kutuzov
vkutuzov at accesssoftek.com
Mon Jan 12 12:18:38 PST 2015
Author: vkutuzov
Date: Mon Jan 12 14:18:38 2015
New Revision: 225688
URL: http://llvm.org/viewvc/llvm-project?rev=225688&view=rev
Log:
[Msan] Fix use of mmap(MAP_ANONYMOUS) in the unit tests on FreeBSD
Differential Revision: http://reviews.llvm.org/D6929
Modified:
compiler-rt/trunk/lib/msan/tests/msan_test.cc
Modified: compiler-rt/trunk/lib/msan/tests/msan_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/tests/msan_test.cc?rev=225688&r1=225687&r2=225688&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/tests/msan_test.cc (original)
+++ compiler-rt/trunk/lib/msan/tests/msan_test.cc Mon Jan 12 14:18:38 2015
@@ -1167,7 +1167,7 @@ TEST(MemorySanitizer, shmctl) {
TEST(MemorySanitizer, shmat) {
void *p = mmap(NULL, 4096, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
+ MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
ASSERT_NE(MAP_FAILED, p);
((char *)p)[10] = *GetPoisoned<U1>();
@@ -4126,7 +4126,8 @@ TEST(MemorySanitizer, LargeAllocatorUnpo
// Allocate the page that was released to the OS in free() with the real mmap,
// bypassing the interceptor.
- char *q = (char *)real_mmap(p, 4096, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
+ char *q = (char *)real_mmap(p, 4096, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
ASSERT_NE((char *)0, q);
ASSERT_TRUE(q <= p);
More information about the llvm-commits
mailing list