Debian Codegraph @

compiler-rt/test/sanitizer_common/TestCases/Linux/mmap64_test.c

raw
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
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 }