Skip to content

Commit 16c15b5

Browse files
[libc] disable mlockall w/ MCL_ONFAULT (#80075)
I suspect this is a bug in linux 4.19, as the test passes as written on my linux 6.5 machine. Let's revisit this after the build bots are upgraded. Link: #80073
1 parent 2f490f9 commit 16c15b5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

libc/test/src/sys/mman/linux/mlock_test.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,13 @@ TEST(LlvmLibcMlockTest, InvalidFlag) {
131131

132132
// Invalid mlockall flags.
133133
EXPECT_THAT(LIBC_NAMESPACE::mlockall(1234), Fails(EINVAL));
134-
EXPECT_THAT(LIBC_NAMESPACE::mlockall(MCL_ONFAULT), Fails(EINVAL));
134+
135+
// man 2 mlockall says EINVAL is a valid return code when MCL_ONFAULT was
136+
// specified without MCL_FUTURE or MCL_CURRENT, but this seems to fail on
137+
// Linux 4.19.y (EOL).
138+
// TODO(ndesaulniers) re-enable after
139+
// https://github.com/llvm/llvm-project/issues/80073 is fixed.
140+
// EXPECT_THAT(LIBC_NAMESPACE::mlockall(MCL_ONFAULT), Fails(EINVAL));
135141

136142
LIBC_NAMESPACE::munmap(addr, alloc_size);
137143
}

0 commit comments

Comments
 (0)