aboutsummaryrefslogtreecommitdiffstats
path: root/executor/executor_linux.h
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-12-15 19:21:25 +0100
committerDmitry Vyukov <dvyukov@google.com>2020-12-16 05:49:44 +0100
commit1b84ed358f51f36c0dd1f69ce45a158f82b5f140 (patch)
tree89605c73b327818ad6dd5f899fdc78ea6a22a65f /executor/executor_linux.h
parentf213e07ead587b07a84e60c356520bce7277166c (diff)
executor: don't use coverage edges for gvisor
gvisor coverage is not a trace, so producing edges won't work.
Diffstat (limited to 'executor/executor_linux.h')
-rw-r--r--executor/executor_linux.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/executor/executor_linux.h b/executor/executor_linux.h
index 8c5a19ef7..9de1b1c40 100644
--- a/executor/executor_linux.h
+++ b/executor/executor_linux.h
@@ -168,19 +168,23 @@ static void cover_collect(cover_t* cov)
cov->size = *(uint32*)cov->data;
}
-static bool cover_check(uint32 pc)
+static bool use_cover_edges(uint32 pc)
{
return true;
}
-static bool cover_check(uint64 pc)
+static bool use_cover_edges(uint64 pc)
{
#if defined(__i386__) || defined(__x86_64__)
+ if (is_gvisor)
+ return false; // gvisor coverage is not a trace, so producing edges won't work
// Text/modules range for x86_64.
- return is_gvisor || (pc >= 0xffffffff80000000ull && pc < 0xffffffffff000000ull);
-#else
- return true;
+ if (pc < 0xffffffff80000000ull || pc >= 0xffffffffff000000ull) {
+ debug("got bad pc: 0x%llx\n", pc);
+ doexit(0);
+ }
#endif
+ return true;
}
static bool detect_kernel_bitness()