Skip to content

Improve fuzz coverage: realloc with --no-default-features#5

Merged
koute merged 4 commits into
koute:masterfrom
xermicus:cl/fuzzer
May 25, 2026
Merged

Improve fuzz coverage: realloc with --no-default-features#5
koute merged 4 commits into
koute:masterfrom
xermicus:cl/fuzzer

Conversation

@xermicus

@xermicus xermicus commented May 20, 2026

Copy link
Copy Markdown
Contributor

Two smallies regarding the fuzz harness:

New Realloc op in allocator_buffer. The harness already exercises alloc, free, shrink_inplace, and grow_inplace but doesn't touch Allocator::realloc. This adds a Realloc { index, size } variant that calls realloc with the new size, then mirrors the existing data-integrity bookkeeping:: asserts the surviving prefix (min(old, new) bytes) matches the previously written data, refills the tail on grow with a deterministic pattern so subsequent ops still pass their checks, and updates alive_addresses if the pointer changed.

Run allocator_buffer with realloc_inplace off too. The fuzz crate's picoalloc dep is restructured to forward the realloc_inplace feature, and ci/jobs/fuzz.sh invokes the target twice — once with default features and once with --no-default-features. This way both the in-place and the alloc-copy-free paths inside realloc get fuzzed.

With #4 this PR should be green too.

xermicus added 3 commits May 20, 2026 15:32
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
@xermicus xermicus marked this pull request as ready for review May 20, 2026 13:49
@xermicus xermicus changed the title Improve fuzz coverage Improve fuzz coverage: realloc with --no-default-features May 21, 2026
@koute koute merged commit 415ddb7 into koute:master May 25, 2026
3 checks passed
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