aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-02-15 16:12:41 +0100
committerDmitry Vyukov <dvyukov@google.com>2017-02-15 16:12:41 +0100
commit104126b97057a9a60c055762dfb1b29ae2b458f5 (patch)
treeb395a1c03b1865f4777ff6868b47bd8cbb585dda /executor
parent3e137e030f31ba2f22719b94b62a184db766f2b4 (diff)
executor: treat KCOV_ENABLE failure as transient
It fails with various errors (9, 14, 25), probably fuzzer messes with the fd.
Diffstat (limited to 'executor')
-rw-r--r--executor/executor.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/executor/executor.cc b/executor/executor.cc
index 7ab747c73..7b224e334 100644
--- a/executor/executor.cc
+++ b/executor/executor.cc
@@ -616,8 +616,12 @@ void cover_enable(thread_t* th)
if (!flag_cover)
return;
debug("#%d: enabling /sys/kernel/debug/kcov\n", th->id);
- if (ioctl(th->cover_fd, KCOV_ENABLE, 0))
- fail("cover enable write failed");
+ if (ioctl(th->cover_fd, KCOV_ENABLE, 0)) {
+ // This should be fatal,
+ // but in practice ioctl fails with assorted errors (9, 14, 25),
+ // so we use exitf.
+ exitf("cover enable write failed");
+ }
debug("#%d: enabled /sys/kernel/debug/kcov\n", th->id);
}