This is an archive of the discontinued LLVM Phabricator instance.

Make FuzzerLoop error printing more uniform.
Needs ReviewPublic

Authored by aarongreen on Sep 16 2019, 4:55 PM.

Details

Reviewers
phosek
mcgrathr
Summary

This change ensures libfuzzer always prints errors the same way, i.e. "==<pid>== ERROR: libfuzzer: ...". For simple errors, it provides PrintError(const char *). For formatted errors, the approach is to use PrintErrorPrefix, followed by Printf. Having a formatted version of PrintError, i.e. PrintErrorf, was considered but avoided since there isn't a varargs version of Printf available in FuzzerIO.h (VPrintf is not equivalent to vprintf).

This change also makes sure libfuzzer reports when the sanitizer invokes its death callback, which allows easier log collection on platforms that process exceptions out of process (e.g. Fuchsia)

Finally, it corrects the error message for overwriting const input data.

Diff Detail

Event Timeline

aarongreen created this revision.Sep 16 2019, 4:55 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptSep 16 2019, 4:55 PM
Herald added subscribers: llvm-commits, Restricted Project. · View Herald Transcript