aboutsummaryrefslogtreecommitdiffstats
path: root/executor/executor.cc
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2019-02-13 11:34:51 +0100
committerDmitry Vyukov <dvyukov@google.com>2019-02-13 15:58:42 +0100
commit982ed4be0bd2d246ee3a5bcdf61fca4b7dce8c0e (patch)
tree8f9b4cde4d074d914e13c58c73d728561d0e40bd /executor/executor.cc
parent2502eeaa7990057f970a34d694904baf32e334d6 (diff)
executor: fix detection of blocked calls
Unfinished calls are always blocked too, so set the blocked flag for unfinished calls.
Diffstat (limited to 'executor/executor.cc')
-rw-r--r--executor/executor.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/executor/executor.cc b/executor/executor.cc
index 4d60b10cc..22a728905 100644
--- a/executor/executor.cc
+++ b/executor/executor.cc
@@ -863,12 +863,11 @@ void copyout_call_results(thread_t* th)
void write_call_output(thread_t* th, bool finished)
{
uint32 reserrno = 999;
- uint32 call_flags = call_flag_executed;
const bool blocked = th != last_scheduled;
+ uint32 call_flags = call_flag_executed | (blocked ? call_flag_blocked : 0);
if (finished) {
reserrno = th->res != -1 ? 0 : th->reserrno;
call_flags |= call_flag_finished |
- (blocked ? call_flag_blocked : 0) |
(th->fault_injected ? call_flag_fault_injected : 0);
}
#if SYZ_EXECUTOR_USES_SHMEM