diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-03-28 14:42:02 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-03-30 19:51:27 +0200 |
| commit | 7c923cf8d45b650c4251503c11e74653779c74c4 (patch) | |
| tree | 4ca1b65085c4fec4c2766fe558cdf69c8aaa9457 /executor/executor_linux.cc | |
| parent | d47f0ed6854fcc09c5db820d4e3aed72a6074841 (diff) | |
sys/linux: add support for mounting filesystem images
Diffstat (limited to 'executor/executor_linux.cc')
| -rw-r--r-- | executor/executor_linux.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/executor/executor_linux.cc b/executor/executor_linux.cc index dcb2e78cb..b1c0a5e42 100644 --- a/executor/executor_linux.cc +++ b/executor/executor_linux.cc @@ -119,6 +119,8 @@ int main(int argc, char** argv) return 1; } +static __thread thread_t* current_thread; + long execute_syscall(call_t* c, long a0, long a1, long a2, long a3, long a4, long a5, long a6, long a7, long a8) { if (c->call) @@ -159,12 +161,15 @@ void cover_enable(thread_t* th) if (ioctl(th->cover_fd, KCOV_ENABLE, kcov_mode)) exitf("cover enable write trace failed, mode=%d", kcov_mode); debug("#%d: enabled /sys/kernel/debug/kcov\n", th->id); + current_thread = th; } void cover_reset(thread_t* th) { if (!flag_cover) return; + if (th == 0) + th = current_thread; __atomic_store_n(th->cover_size_ptr, 0, __ATOMIC_RELAXED); } |
