aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2021-02-25 15:20:44 +0100
committerDmitry Vyukov <dvyukov@google.com>2021-02-26 10:33:51 +0100
commit4c37c133e4bf703d023995535f1e264d8658e08e (patch)
tree50347632cb63bd13d10afe1a232f6493520d641f
parent86d368fe15d1ec06cda9fedc5faf2e7adb034eb8 (diff)
executor: improve SYZFAIL message
Print details and errno after SYZFAIL line. pkg/report captures output after SYZFAIL line, so it's better to have details after that line so that they are captured in report.
-rw-r--r--executor/executor.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/executor/executor.cc b/executor/executor.cc
index 80fdc49cc..0dec5e166 100644
--- a/executor/executor.cc
+++ b/executor/executor.cc
@@ -1511,6 +1511,7 @@ void setup_features(char** enable, int n)
void failmsg(const char* err, const char* msg, ...)
{
int e = errno;
+ fprintf(stderr, "SYZFAIL: %s\n", err);
if (msg) {
va_list args;
va_start(args, msg);
@@ -1518,7 +1519,6 @@ void failmsg(const char* err, const char* msg, ...)
va_end(args);
}
fprintf(stderr, " (errno %d: %s)\n", e, strerror(e));
- fprintf(stderr, "SYZFAIL: %s\n", err);
// fail()'s are often used during the validation of kernel reactions to queries
// that were issued by pseudo syscalls implementations. As fault injection may