Commit 8fdb91cd authored by Samuel Groß's avatar Samuel Groß Committed by V8 LUCI CQ

[base] Drop MFD_CLOEXEC in OS::CreateSharedMemoryHandleForTesting

The flag is causing build failures in some environments (when it is not
defined) and it is not actually needed since the behaviour of these FDs
across fork/exec isn't defined and this code is only used for testing.

Bug: chromium:1218005
Change-Id: If2bf6835705318079af56d920017accedaf769dd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3695583
Commit-Queue: Samuel Groß <saelo@chromium.org>
Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81032}
parent 31850be1
......@@ -610,8 +610,9 @@ PlatformSharedMemoryHandle OS::CreateSharedMemoryHandleForTesting(size_t size) {
reinterpret_cast<memfd_create_t>(dlsym(RTLD_DEFAULT, "memfd_create"));
int fd = -1;
if (memfd_create) {
fd = memfd_create("V8MemFDForTesting", MFD_CLOEXEC);
} else {
fd = memfd_create("V8MemFDForTesting", 0);
}
if (fd == -1) {
char filename[] = "/tmp/v8_tmp_file_for_testing_XXXXXX";
fd = mkstemp(filename);
if (fd != -1) CHECK_EQ(0, unlink(filename));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment