Problem Description
With the recent additions of complex data structures (Fenwick Trees, Suffix Arrays, Advanced Heaps), relying solely on fixed unit tests might miss rare edge-case segmentation faults or use-after-free errors. We need a way to subject these structures to chaotic, randomized operations to truly validate their memory safety under Valgrind/ASan.
Proposed Solution
Build a lightweight Fuzz Testing module (fuzzer.c).
- Create a function that generates a massive sequence (e.g., 100,000 operations) of randomized insertions, deletions, and lookups using
rand().
- Apply this stress test to complex structures (like Red-Black Trees or Graphs).
- The engine should track the operations and, if a segfault occurs, print the exact seed and sequence of operations that caused the crash for easy debugging.
- Hook this fuzzer into the
make test pipeline so CI can catch unstable operations.
Additional Context
Suggested Labels: new feature, Hard, SSoC26
Note for Maintainers: I have cleared my previous pending assignments and my queue is empty. I am well aware of the project's strict formatting and memory safety standards. If assigned, I guarantee that I will run make fmt, make test, and make valgrind to ensure zero memory leaks and proper clang-formatting before raising the PR. Could you please assign this to me?
Problem Description
With the recent additions of complex data structures (Fenwick Trees, Suffix Arrays, Advanced Heaps), relying solely on fixed unit tests might miss rare edge-case segmentation faults or use-after-free errors. We need a way to subject these structures to chaotic, randomized operations to truly validate their memory safety under Valgrind/ASan.
Proposed Solution
Build a lightweight Fuzz Testing module (
fuzzer.c).rand().make testpipeline so CI can catch unstable operations.Additional Context
Suggested Labels:
new feature,Hard,SSoC26Note for Maintainers: I have cleared my previous pending assignments and my queue is empty. I am well aware of the project's strict formatting and memory safety standards. If assigned, I guarantee that I will run
make fmt,make test, andmake valgrindto ensure zero memory leaks and proper clang-formatting before raising the PR. Could you please assign this to me?