This is an archive of the discontinued LLVM Phabricator instance.

[fuzzer] Use RawPrint instead of Printf for instrumentation warning
ClosedPublic

Authored by metzman on Jan 31 2019, 11:34 AM.

Details

Summary

Use RawPrint instead of Printf for instrumentation warning because
Printf doesn't yet work when instrumentation is being initialized
(since OutputFile is not yet initialized).

Diff Detail

Event Timeline

metzman created this revision.Jan 31 2019, 11:34 AM

Please take a look.
This fixes the deprecated-instrumentation.test which is currently failing on Windows because the message doesn't print.
It doesn't print because OutputFile in FuzzerIO.cpp is not yet initialized when WarnAboutDeprecatedInstrumentation is called.
An alternative to this fix is just disabling the test on Windows, I don't worry much about the message not being printed because I don't think anyone has ever used trace-pc on Win with libFuzzer.

kcc accepted this revision.Jan 31 2019, 12:04 PM

LGTM, thanks!

This revision is now accepted and ready to land.Jan 31 2019, 12:04 PM
metzman updated this revision to Diff 184573.Jan 31 2019, 12:31 PM

commit message

This revision was automatically updated to reflect the committed changes.
Herald added subscribers: Restricted Project, llvm-commits. · View Herald TranscriptJan 31 2019, 12:32 PM