This is an archive of the discontinued LLVM Phabricator instance.

[libFuzzer] don't change sanitizer_report_fd for fuchsia.
Needs ReviewPublic

Authored by charco on Oct 16 2019, 11:48 PM.

Details

Reviewers
aarongreen
phosek
Summary

This commit modifies the DupAndCloseStderr function in FuzzerIO.cpp,
adding an if-macro to exclude calling sanitizer_set_report in fuchsia.

Fuchsia does not have support for that function and if it is called, the
program will crash because it is unimplemented.

Discarding the sanitizer reports from stderr is not an issue because
they are also being logged to the console and are available via `fx
syslog`.

Event Timeline

charco created this revision.Oct 16 2019, 11:48 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptOct 16 2019, 11:48 PM
Herald added subscribers: llvm-commits, Restricted Project. · View Herald Transcript
charco edited reviewers, added: phosek; removed: mcgrathr.Nov 4 2019, 5:56 PM
phosek added inline comments.Nov 5 2019, 10:59 AM
compiler-rt/lib/fuzzer/FuzzerIO.cpp
119

Can you indent the comment so it starts on the same column as the rest of this block?

120

I'd omit the second sentence, fx syslog is an internal detail of Fuchsia development workflow and is irrelevant here.