Skip to content

Enable exploreState without value profile#1037

Open
kyakdan wants to merge 7 commits intomainfrom
exploreState-no-value-profile
Open

Enable exploreState without value profile#1037
kyakdan wants to merge 7 commits intomainfrom
exploreState-no-value-profile

Conversation

@kyakdan
Copy link
Member

@kyakdan kyakdan commented Feb 9, 2026

This PR is based on #1036. Thus, it should be reviewed after merging that PR and rebasing on main

CountersTracker provides a flexible API for mapping program state to
coverage counters, enabling incremental progress feedback to libFuzzer.

Key features:
- ensureCountersAllocated(id, numCounters): allocate counter range
- setCounter/setCounterRange: set counter values by ID and offset
- Thread-safe allocation via ConcurrentHashMap
- Separate memory region from main coverage map

This lays the foundation for the maximize() hill-climbing API.
Add Jazzer.maximize(value, id, minValue, maxValue) for guiding the
fuzzer to maximize a value over time. For each observed value v in
[minValue, maxValue], sets counters [0, v-minValue] to signal progress.

Features:
- Enables corpus minimization (only max-value input retained)
- Convenience overload without explicit ID (uses instrumentation hook)
- Delegates to CountersTracker for counter management
- No state in Jazzer.java - all managed by CountersTracker
Example shows how maximize() helps fuzz a chaotic feedback system
where standard coverage provides no guidance. The fuzzer is guided
to increase "temperature" through complex state-dependent logic.
Replace the tracePcIndir-based value profiling approach with dedicated
coverage counters via CountersTracker. This removes the dependency on
-use_value_profile=1 and tracks all 256 byte values (up from 128) by
mapping each to a unique (counter, bucket) pair across 32 counters.
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.

1 participant