summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test/sanitizer_common/TestCases/Linux/mmap64_test.c
blob: f4c009d846afb5ca2eb4e935f50d4e601f987ccd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// RUN: %clang %s -o %t && %run %t

#define _LARGEFILE64_SOURCE 1

#include <assert.h>
#include <sys/mman.h>

int main() {
  char *buf = (char *)mmap64(0, 100000, PROT_READ | PROT_WRITE,
                             MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
  assert(buf);
  munmap(buf, 100000);
}
OpenPOWER on IntegriCloud