owengage / fastnbt

Fast serde serializer and deserializer for Minecraft's NBT and Anvil formats
MIT License
186 stars 34 forks source link

Initialize fuzzing and add a few targets #29

Closed Badel2 closed 3 years ago

Badel2 commented 3 years ago

Check out the Rust Fuzz Book for installation instructions.

Start fuzzing:

cargo +nightly fuzz run deserialize_value

To add new targets:

cargo +nightly fuzz add deserialize_something_else
Badel2 commented 3 years ago

The deserialize_value target has already found a panic. The workflow in that case is to add a test and fix it, but not sure how do you want to organize tests so I'll leave that to you. When you find a panic you need to fix it to continue fuzzing, otherwise it will just find the same panic again and again.

owengage commented 3 years ago

This is fantastic, thank you very much. Yeah, I'll figure out some way of organising the test cases. I expect there are quite a lot of panics to be had, I didn't have corrupt data or anything in mind when writing the deserializer.