xref: /llvm-project/compiler-rt/test/sanitizer_common/TestCases/Posix/mmap_test.c (revision 78457e68f4363b5dee3007d186618133f227058c)
1 // RUN: %clang %s -o %t && %run %t
2 
3 #include <assert.h>
4 #include <sys/mman.h>
5 
main()6 int main() {
7   char *buf = (char *)mmap(0, 100000, PROT_READ | PROT_WRITE,
8                            MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
9   assert(buf);
10   munmap(buf, 100000);
11 }
12