Skip to content

Conversation

@evanrichter
Copy link
Contributor

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!

@phil-opp
Copy link
Member

Thanks a lot for this PR and sorry for the delay in merging!

@phil-opp phil-opp merged commit aa7d9f6 into rust-osdev:main Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants