From e942bb7959961890e0fafce00076331917d7ac76 Mon Sep 17 00:00:00 2001 From: Cameron Finucane Date: Mon, 10 Jun 2024 18:56:43 -0700 Subject: executor: map input buffer as shared To receive data, executor relies on changes propagating to its copy of the shared memory buffer. This is only guaranteed with MAP_SHARED, whereas behavior is "unspecified" for MAP_PRIVATE (but happened to work on most implementations). --- executor/executor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/executor/executor.cc b/executor/executor.cc index 2c73c20dd..88a0963c8 100644 --- a/executor/executor.cc +++ b/executor/executor.cc @@ -460,7 +460,7 @@ int main(int argc, char** argv) os_init(argc, argv, (char*)SYZ_DATA_OFFSET, SYZ_NUM_PAGES * SYZ_PAGE_SIZE); current_thread = &threads[0]; - void* mmap_out = mmap(NULL, kMaxInput, PROT_READ, MAP_PRIVATE, kInFd, 0); + void* mmap_out = mmap(NULL, kMaxInput, PROT_READ, MAP_SHARED, kInFd, 0); if (mmap_out == MAP_FAILED) fail("mmap of input file failed"); input_data = static_cast(mmap_out); -- cgit mrf-deployment