diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-12-10 16:04:18 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-12-10 16:08:35 +0100 |
| commit | cb704a294c54aed90281c016a6dc0c40ae295601 (patch) | |
| tree | 4aac076186076a786c43b9bdf584c980747d0617 /executor/executor_linux.h | |
| parent | 5a5826a14e99564bdd4de163d3ac368056e5d992 (diff) | |
executor: fix syz_mount_image
1. It always crashed in cover_reset when coverage is disabled.
2. Use NONFAILING when accessing image segments.
3. Give it additional 100 ms as it may be slow.
4. Add a test for syz_mount_image.
Diffstat (limited to 'executor/executor_linux.h')
| -rw-r--r-- | executor/executor_linux.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/executor/executor_linux.h b/executor/executor_linux.h index 13d6a598e..73005877d 100644 --- a/executor/executor_linux.h +++ b/executor/executor_linux.h @@ -139,8 +139,14 @@ static void cover_enable(cover_t* cov, bool collect_comps, bool extra) static void cover_reset(cover_t* cov) { - if (cov == 0) + // Callers in common_linux.h don't check this flag. + if (!flag_coverage) + return; + if (cov == 0) { + if (current_cover == 0) + fail("cover_reset: current_cover == 0"); cov = current_cover; + } *(uint64*)cov->data = 0; } |
