Crates.io | sancov |
lib.rs | sancov |
version | 0.1.0 |
source | src |
created_at | 2022-09-16 18:22:38.934594 |
updated_at | 2022-09-16 18:22:38.934594 |
description | Rust bindings to LLVM's `SanitizerCoverage` interface. |
homepage | |
repository | https://github.com/rust-fuzz/sancov |
max_upload_size | |
id | 667605 |
size | 22,276 |
Rust bindings to LLVM's SanitizerCoverage
interface.
Using these bindings allows you to convey additional coverage information to the
SanitizerCoverage
consumer, which is typically a fuzzer like libFuzzer
. You
can, for example, convey edge coverage information inside JIT code or which size
classes are being allocated from in your custom allocator that would otherwise
not be made visible by LLVM's inserted coverage instrumentation.
use sancov::Counters;
// Define a bunch of counters.
static COUNTERS: Counters<4096> = Counters::new();
// Register the counters with the `SanitizerCoverage` consumer.
COUNTERS.register();
// Increment a counter when some custom code is executed!
COUNTERS[42].increment()