Skip to content

Commit

Permalink
executor: repair debug mode
Browse files Browse the repository at this point in the history
Don't print SYZFAIL messages during machine check.
Otherwise each of them is detected as a bug.
  • Loading branch information
dvyukov committed Jul 8, 2024
1 parent 845ac47 commit e03bdbc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion executor/executor_runner.h
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,14 @@ class Proc
}
if (flag_debug) {
output_.resize(output_.size() + 1);
debug("proc %d: got output: %s\n", id_, output_.data() + debug_output_pos_);
const 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";
debug("proc %d: got output: %s\n", id_, output);
output_.resize(output_.size() - 1);
debug_output_pos_ = output_.size();
}
Expand Down

0 comments on commit e03bdbc

Please sign in to comment.