1 // RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
3 // Fails on Darwin bots:
4 // https://green.lab.llvm.org/green//job/clang-stage1-RA/25954/consoleFull
5 // and on clang-s390x-linux-lnt:
6 // https://lab.llvm.org/buildbot#builders/45/builds/5224
7 // Presumably the test is not 100% legal and kernel is allowed
8 // to unmap part of the range (e.g. .text) and then fail.
9 // So let's be conservative:
10 // REQUIRES: linux, x86_64-target-arch
16 // These bogus munmap's must not crash tsan runtime.
19 munmap((void *)main
, -1);
21 mmap(0, 4096, PROT_READ
| PROT_WRITE
, MAP_ANON
| MAP_PRIVATE
, -1, 0);
22 munmap(p
, (1ull << 60));
25 fprintf(stderr
, "DONE\n");