From cb704a294c54aed90281c016a6dc0c40ae295601 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 10 Dec 2019 16:04:18 +0100 Subject: 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. --- executor/executor_linux.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'executor/executor_linux.h') 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; } -- cgit mrf-deployment