aboutsummaryrefslogtreecommitdiffstats
path: root/executor/executor.cc
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-04-18 14:43:29 +0200
committerDmitry Vyukov <dvyukov@google.com>2020-04-18 14:43:29 +0200
commit365fba2440cee3aed74c774867a1f43e3e2f7aac (patch)
treed148c5d3f2e417b31d3dca1ae0e5d9c77da847b9 /executor/executor.cc
parent6fe0f49646813924a072d786e080ab7bf4f9ab65 (diff)
executor: surround the data mapping with PROT_NONE pages
Surround the main data mapping with PROT_NONE pages to make virtual address layout more consistent across different configurations (static/non-static build) and C repros. One observed case before: executor had a mapping above the data mapping (output region), while C repros did not have that mapping above, as the result in one case VMA had next link, while in the other it didn't and it caused a bug to not reproduce with the C repro. The bug that reproduces only with the mapping above: https://lkml.org/lkml/2020/4/17/819
Diffstat (limited to 'executor/executor.cc')
-rw-r--r--executor/executor.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/executor/executor.cc b/executor/executor.cc
index 9553228a2..084bb5736 100644
--- a/executor/executor.cc
+++ b/executor/executor.cc
@@ -356,7 +356,7 @@ int main(int argc, char** argv)
start_time_ms = current_time_ms();
- os_init(argc, argv, (void*)SYZ_DATA_OFFSET, SYZ_NUM_PAGES * SYZ_PAGE_SIZE);
+ os_init(argc, argv, (char*)SYZ_DATA_OFFSET, SYZ_NUM_PAGES * SYZ_PAGE_SIZE);
#if SYZ_EXECUTOR_USES_SHMEM
if (mmap(&input_data[0], kMaxInput, PROT_READ, MAP_PRIVATE | MAP_FIXED, kInFd, 0) != &input_data[0])