Expand description
SanitizerCoverage callbacks for coverage-guided fuzzing of native Rust code.
Provides LLVM SanitizerCoverage callbacks and a coverage map that can be set
by the fuzzing executor to collect edge coverage from instrumented Rust
crates (e.g. precompile implementations compiled with -Cpasses=sancov-module).
Additionally provides trace-cmp callbacks that capture comparison operands and surface them to the fuzzerβs dictionary, enabling it to solve comparison guards (balance checks, overflow guards, etc.).
Only crates compiled with sancov instrumentation (via a RUSTC_WRAPPER)
will trigger these callbacks β no runtime filtering needed.
StructsΒ§
- CmpSample
- A single comparison operand captured by a trace-cmp callback.
ConstantsΒ§
- CMP_
OPERANDS π - MAX_
CMP_ πOPERANDS - UNASSIGNED π
StaticsΒ§
- COVERAGE_
MAP_ πLEN - COVERAGE_
MAP_ πPTR - GUARD_
COUNTER π - GUARD_
LOOKUP π - NEXT_
SANCOV_ πIDX
FunctionsΒ§
- __
sanitizer_ βcov_ trace_ cmp1 - Safety
- __
sanitizer_ βcov_ trace_ cmp2 - Safety
- __
sanitizer_ βcov_ trace_ cmp4 - Safety
- __
sanitizer_ βcov_ trace_ cmp8 - Safety
- __
sanitizer_ βcov_ trace_ const_ cmp1 - Safety
- __
sanitizer_ βcov_ trace_ const_ cmp2 - Safety
- __
sanitizer_ βcov_ trace_ const_ cmp4 - Safety
- __
sanitizer_ βcov_ trace_ const_ cmp8 - Safety
- __
sanitizer_ βcov_ trace_ pc_ guard - Safety
- __
sanitizer_ βcov_ trace_ pc_ guard_ init - Safety
- __
sanitizer_ βcov_ trace_ switch - Safety
- clear_
cmp_ operands - Clear all captured comparison operands on the current thread.
- clear_
coverage_ map - Deactivate the coverage map.
- drain_
cmp_ operands - Drain all captured comparison operands from the current thread.
- is_
active - Whether a coverage map is currently active.
- record_
cmp π - record_
hit - Record a hit for the given guard ID into the active coverage map.
- sancov_
edge_ count - Number of unique sancov edges discovered so far.
- set_
coverage_ map - Point the coverage map at the given buffer. Subsequent
__sanitizer_cov_trace_pc_guardcalls will record hits into this buffer.