Closed smackysnacks closed 6 months ago
Thank you! One question: Are the corpus files the same ones as in examples/
? If so, could we (or is it advisable to) reuse them somehow?
Thank you! One question: Are the corpus files the same ones as in
examples/
? If so, could we (or is it advisable to) reuse them somehow?
They are from the assets/
dir that the examples use. We may be able to avoid duplicating them by writing a fuzz/build.rs
that performs the copy at build-time. Let me see if I can get something like that working.
Addresses https://github.com/mapeditor/rs-tiled/issues/209
This PR adds initial
cargo fuzz
integration. Just runcargo +nightly fuzz run tiled
. On my machine it found a panic pretty quickly. You can usecargo +nightly fuzz tmin tiled artifacts/tiled/crash-<ID>
to help minimize the input. Here's the minimized input it found on my machine:And the associated backtrace:
The majority of additions here are sample
tmx
files used to seed the corpus. The actual test harness is https://github.com/mapeditor/rs-tiled/pull/287/files#diff-033f3dc25a239c9a63b10aa400c2d43accb526ed8e9ce918cf4c3d7d6807a54b.