diff options
Diffstat (limited to 'test/sanitizer_common/TestCases/Posix/mmap_test.c')
-rw-r--r-- | test/sanitizer_common/TestCases/Posix/mmap_test.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/sanitizer_common/TestCases/Posix/mmap_test.c b/test/sanitizer_common/TestCases/Posix/mmap_test.c new file mode 100644 index 000000000000..3c272f95a015 --- /dev/null +++ b/test/sanitizer_common/TestCases/Posix/mmap_test.c @@ -0,0 +1,11 @@ +// RUN: %clang %s -o %t && %run %t + +#include <assert.h> +#include <sys/mman.h> + +int main() { + char *buf = (char *)mmap(0, 100000, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + assert(buf); + munmap(buf, 100000); +} |