diff options
Diffstat (limited to 'executor/executor.cc')
| -rw-r--r-- | executor/executor.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/executor/executor.cc b/executor/executor.cc index efd072a75..61e669f39 100644 --- a/executor/executor.cc +++ b/executor/executor.cc @@ -460,8 +460,9 @@ int main(int argc, char** argv) current_thread = &threads[0]; #if SYZ_EXECUTOR_USES_SHMEM - if (mmap(&input_data[0], kMaxInput, PROT_READ, MAP_PRIVATE | MAP_FIXED, kInFd, 0) != &input_data[0]) - fail("mmap of input file failed"); + void* got = mmap(&input_data[0], kMaxInput, PROT_READ, MAP_PRIVATE | MAP_FIXED, kInFd, 0); + if (&input_data[0] != got) + failmsg("mmap of input file failed", "want %p, got %p", &input_data[0], got); mmap_output(kInitialOutput); // Prevent test programs to mess with these fds. @@ -580,7 +581,7 @@ static void mmap_output(int size) void* result = mmap(mmap_at, size - output_size, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_FIXED, kOutFd, output_size); if (result != mmap_at) - fail("mmap of output file failed"); + failmsg("mmap of output file failed", "want %p, got %p", mmap_at, result); output_size = size; } #endif |
