bincode icon indicating copy to clipboard operation
bincode copied to clipboard

Fuzzing

Open slyrz opened this issue 9 years ago • 3 comments

Hello Ty and all the other bincode developers,

I just want to let you know I wrote a small crate to fuzz bincode. It's a program that creates and compiles random type signatures, fills them with values and then serializes/deserializes them to check that what was put in came out right again. It also mutates bincode encodings to make the deserialize function hang or panic. It can detect crashes and stalls and all of that. It's not guided, but it achieves a good coverage since it knows how to create valid encodings.

I think it's pretty cool. Might be useful to run every now and then. For example, it could detect the PRs #133 and #134 or this problem I created in my PR acdf8d5e7d6cc29c3dec55a0dc3a53d15989d5f9.

Let me know what you think. The crate is just a day old and I wrote most of the code in the past hours. If you say "That sounds useful" I'd try to improve the usability by adding a nice command line interface and stuff like that.

slyrz avatar Mar 09 '17 19:03 slyrz

This is super cool! I feel like this could also be a really handy tool for people that want to custom-implement the Serde traits and would like to fuzz their implementations!

TyOverby avatar Mar 13 '17 16:03 TyOverby

Hey @slyrz! Bincode is nearing 1.0 and with the latest update to serde 1.0, I had some changes to make.

Fortunately I had your tool handy and with a few modifications, managed to run it against the work that I had done and found a pretty gnarly bug!

I'll certainly be using this in the future as an additional test suite! Thanks again!

TyOverby avatar Apr 21 '17 05:04 TyOverby

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 13 '21 21:06 stale[bot]