This is an archive of the discontinued LLVM Phabricator instance.

[libFuzzer] Dump trace and provide correct msg for overwritten input.
ClosedPublic

Authored by hctim on Sep 25 2019, 6:05 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

hctim created this revision.Sep 25 2019, 6:05 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptSep 25 2019, 6:05 PM
Herald added subscribers: llvm-commits, Restricted Project. · View Herald Transcript
morehouse added inline comments.Sep 25 2019, 6:18 PM
compiler-rt/lib/fuzzer/FuzzerLoop.cpp
518 ↗(On Diff #221874)

I don't see a benefit to printing this stack trace -- it will always be in libFuzzer code.

521 ↗(On Diff #221874)

Also not sure if stats are actually valuable. Overwriting the input means there's a bug in the fuzz target, probably not the library being fuzzed.

Dor1s accepted this revision.Sep 25 2019, 9:25 PM

I think Matt is right, but I wouldn't mind to have the stacktrace and stats just to be consistent with the other crashes. Also, having a stacktrace should increase the chances that such a crash would be handled by fuzzing infrastructure and reported to people.

This revision is now accepted and ready to land.Sep 25 2019, 9:25 PM
hctim marked 2 inline comments as done.Sep 26 2019, 11:44 AM
hctim added inline comments.
compiler-rt/lib/fuzzer/FuzzerLoop.cpp
518 ↗(On Diff #221874)

From @Dor1s above - it may be nice to have just for consistency's sake.

521 ↗(On Diff #221874)

Not necessarily, they could const_cast away deep in a library and mangle the data down there.

This revision was automatically updated to reflect the committed changes.