Skip to content

Commit 3b07dad

Browse files
committed
executor: do output area cleanup before each execution
We used to do it after query completion, but that leaves some window open for a completely broken executor fork to mess with the data. At the same time, executor expects the area to be completely clean when it starts.
1 parent 0931f9b commit 3b07dad

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

executor/executor_runner.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,9 @@ class Proc
379379

380380
debug("proc %d: start executing request %llu\n", id_, static_cast<uint64>(msg_->id));
381381

382+
// Executor expects the output_data memory to be already zeroed.
383+
resp_mem_->Reset();
384+
382385
rpc::ExecutingMessageRawT exec;
383386
exec.id = msg_->id;
384387
exec.proc_id = id_;
@@ -447,7 +450,6 @@ class Proc
447450
auto data = finish_output(resp_mem_, id_, msg_->id, num_calls, elapsed, freshness_++, status, hanged, output);
448451
conn_.Send(data.data(), data.size());
449452

450-
resp_mem_->Reset();
451453
msg_.reset();
452454
output_.clear();
453455
debug_output_pos_ = 0;

0 commit comments

Comments
 (0)