diff options
Diffstat (limited to 'compiler-rt/test/sanitizer_common/TestCases/Linux/mlock_test.cpp')
| -rw-r--r-- | compiler-rt/test/sanitizer_common/TestCases/Linux/mlock_test.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/compiler-rt/test/sanitizer_common/TestCases/Linux/mlock_test.cpp b/compiler-rt/test/sanitizer_common/TestCases/Linux/mlock_test.cpp new file mode 100644 index 00000000000..a952922aaab --- /dev/null +++ b/compiler-rt/test/sanitizer_common/TestCases/Linux/mlock_test.cpp @@ -0,0 +1,13 @@ +// RUN: %clang %s -o %t && %run %t +// XFAIL: ubsan,lsan + +#include <assert.h> +#include <sys/mman.h> + +int main() { + assert(0 == mlockall(MCL_CURRENT)); + assert(0 == mlock((void *)0x12345, 0x5678)); + assert(0 == munlockall()); + assert(0 == munlock((void *)0x987, 0x654)); +} + |

