1 // Test that sanitizers suppress mlock.
2 // RUN: %clang %s -o %t && %run %t
4 // No shadow, so no need to disable mlock.
14 #if defined(__has_feature)
15 # if __has_feature(hwaddress_sanitizer)
16 // Don't mlock, it may claim all memory.
20 assert(0 == mlockall(MCL_CURRENT
));
21 assert(0 == mlock((void *)0x12345, 0x5678));
22 assert(0 == munlockall());
23 assert(0 == munlock((void *)0x987, 0x654));