loiclec / fuzzcheck-rs

Modular, structure-aware, and feedback-driven fuzzing engine for Rust functions
MIT License
436 stars 13 forks source link

Support for floating point values? #43

Open andrew-otiv opened 5 months ago

andrew-otiv commented 5 months ago

I'm hitting "the trait DefaultMutator is not implemeted for f64" while trying to automatically derive fuzzcheck::DefaultMonitor for a large tree of code generated types that include floating point values.

the trait DefaultMutator is not implemented for f64 = help: the following other types implement trait DefaultMutator: i16 i32 i64 i8 isize u16 u32 u64 and 2 others

This is on the current main branch: "fuzzcheck": crate.spec( git="https://github.com/loiclec/fuzzcheck-rs.git", rev="9077693abd90bb44955ed008749b5902acfa65bd", ),

What's the status on supporting f32, f64 types? I could write a minimized example, but I'm guessing this just isn't implemented yet, possibly becuase IEEE floats are weird about comparisons and non-unique binary representations.

Thanks for the promising looking library!

teymour-aldridge commented 2 months ago

Hi sorry for the really late response, I don't think these are supported yet but more for lack of implementation than not being desirable. If you have an implementation that would be amazing!