this test is flaky because of ASLR
app memory is
7e8000000000-
800000000000,
there may or may not be a 1TB hole depending on
where ASLR will choose to map libraries
llvm-svn: 223469
// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
#include <stdint.h>
#include <stdio.h>
+#include <errno.h>
#include <sys/mman.h>
int main() {
- const size_t kLog2Size = 40;
+ const size_t kLog2Size = 39;
const uintptr_t kLocation = 0x40ULL << kLog2Size;
void *p = mmap(
reinterpret_cast<void*>(kLocation),
PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE,
-1, 0);
- fprintf(stderr, "DONE %p\n", p);
+ fprintf(stderr, "DONE %p %d\n", p, errno);
return p == MAP_FAILED;
}