aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2024-08-14 16:11:08 +0200
committerDmitry Vyukov <dvyukov@google.com>2024-08-16 09:31:43 +0000
commit5340a9ab4c1ab7801ad1055041dec2c2ff50a254 (patch)
tree70a6042fea9cc2947c4e63f6b616ce454704d0cc /executor
parent17b06ddde717d359217c78d03f322944b5e57a8a (diff)
executor: keep SYZFAIL messages during machine check
Replace just the SYZFAIL part instead of the whole message. This makes debugging of things easier.
Diffstat (limited to 'executor')
-rw-r--r--executor/executor_runner.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/executor/executor_runner.h b/executor/executor_runner.h
index f1a4f701d..30a5f3a6d 100644
--- a/executor/executor_runner.h
+++ b/executor/executor_runner.h
@@ -431,13 +431,16 @@ private:
}
if (flag_debug) {
output_.resize(output_.size() + 1);
- const char* output = reinterpret_cast<char*>(output_.data()) + debug_output_pos_;
+ char* output = reinterpret_cast<char*>(output_.data()) + debug_output_pos_;
// During machine check we can execute some requests that legitimately fail.
// These requests have ReturnError flag, so that the failure is returned
// to the caller for analysis. Don't print SYZFAIL in these requests,
// otherwise it will be detected as a bug.
- if (msg_ && IsSet(msg_->flags, rpc::RequestFlag::ReturnError) && strstr(output, "SYZFAIL"))
- output = "REDACTED-CONTAINS-FAIL";
+ if (msg_ && IsSet(msg_->flags, rpc::RequestFlag::ReturnError)) {
+ char* syzfail = strstr(output, "SYZFAIL");
+ if (syzfail)
+ memcpy(syzfail, "NOTFAIL", strlen("NOTFAIL"));
+ }
debug("proc %d: got output: %s\n", id_, output);
output_.resize(output_.size() - 1);
debug_output_pos_ = output_.size();