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