feat(fuzz): add cargo-fuzz harness for insert/get/remove sequences - #13
Open
saiteja00743 wants to merge 1 commit into
Open
feat(fuzz): add cargo-fuzz harness for insert/get/remove sequences#13saiteja00743 wants to merge 1 commit into
saiteja00743 wants to merge 1 commit into
Conversation
Closes ddsha441981#7 Adds a complete cargo-fuzz setup with a tagged-operation stream harness that exercises PulseMap's core unsafe code paths: - fuzz/Cargo.toml — fuzz workspace crate (libfuzzer-sys + pulse_map) - fuzz/rust-toolchain.toml — auto-selects nightly when inside fuzz/ - fuzz/fuzz_targets/fuzz_sequences.rs — fuzz target covering: * insert(key, value) * get(key) — value integrity check after insert * remove(key) — get() == None invariant enforced * peek(key) — must agree with get() on presence * insert_ttl(key, value, ttl) — per-entry TTL override * AdvanceEpoch — dummy inserts to trigger lazy TTL eviction - fuzz/README.md — setup instructions for Linux, WSL2 (Windows), Docker, corpus seeding, crash reproduction, and GitHub Actions CI integration Root Cargo.toml gains [workspace] so cargo check --workspace covers the fuzz crate on stable/Windows without needing nightly. Invariants checked on every operation: - get() after remove() always returns None - get() after insert(k,v) returns the exact same bytes - peek() and get() always agree on key presence - len() <= capacity() at all times - load_factor() stays in [0.0, 1.0]
Owner
|
Hi @saiteja00743 , thanks for jumping on this so quickly! This looks awesome. I'm a bit tied up with my primary work this week, but I will do a detailed review and merge this over the weekend. Appreciate the contribution |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #7
Adds a complete cargo-fuzz setup with a tagged-operation stream harness that exercises PulseMap's core unsafe code paths:
Docker, corpus seeding, crash reproduction,
and GitHub Actions CI integration
Root Cargo.toml gains [workspace] so cargo check --workspace covers the fuzz crate on stable/Windows without needing nightly.
Invariants checked on every operation: