Do not fuzz with real renderer because it is merely frame copying and
doesn't exercise different control flows. This CL also improved fuzzing
performance and fixed a memory leak.
Bug: chromium:952606, chromium:1009077, chromium:1009073
Change-Id: I77c6f2581db82bfd95edb18e5f0e541a94c78208
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156620
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29522}
This speed up fuzzing because no more SleepMs in real time.
Bug: chromium:959836, chromium:1009073
Change-Id: Ib00a2ff8d6ca2e0bfc706ee7469e0a9c7fb10758
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156362
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29439}
This change integrates fuzzing support for RtpDumps in WebRTC. This allows
LibFuzzer to directly fuzz the RTP code path from packet arrival all the way
to actual decoding and rendering. It does this by replaying each RTP packet
in the RTPDump which can be mutated directly by the fuzzer.
For fuzzing support the RtpFileReader needs to support reading from a
buffer instead of an file. The test class requires FILE* for all its
parsing operations and is deeply coupled this way. I chose to solve this
problem at an OS level by using the tmpfile() option and copying the buffer
to the tmpfile(). fmemopen() is no available on most platforms so couldn't
be used as a generic solution. The additional copy isn't ideal but won't
be a bottleneck for the fuzzing.
In the future I plan for the fuzzers to read from a configuration file. But
given the current packaging strategy for fuzzers in WebRTC this isn't easy.
Bug: webrtc:9860
Change-Id: I2560120e82663f9e9fb5b9640e6a6d16f9c1a360
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126682
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27151}