summaryrefslogtreecommitdiff
path: root/test/sanitizer_common/TestCases/Linux/mlock_test.cpp
blob: a952922aaabc8e18ece499407c319128f042543f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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));
}