This cargo-fuzz harness tests the following actions randomly, making sure each call is safe before invoking linked-list-allocator APIs:
allocate_first_fit
deallocate
extend
It also initializes the Heap with a random size.
Besides the harness, I added a #[cfg(fuzzing)]-gated debug printer for Heap which helped when adding buffering to extend. Since it's not needed for actual fuzzing (the harness has DEBUG = false by default), I can remove that if requested!
This cargo-fuzz harness tests the following actions randomly, making sure each call is safe before invoking linked-list-allocator APIs:
allocate_first_fit
deallocate
extend
It also initializes the Heap with a random size.
Besides the harness, I added a
#[cfg(fuzzing)]
-gated debug printer for Heap which helped when adding buffering to extend. Since it's not needed for actual fuzzing (the harness hasDEBUG = false
by default), I can remove that if requested!