aboutsummaryrefslogtreecommitdiffstats
path: root/executor/executor_linux.h
diff options
context:
space:
mode:
Diffstat (limited to 'executor/executor_linux.h')
-rw-r--r--executor/executor_linux.h8
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;
}