We currently don’t have a dedicated harness targeting CDBWrapper. OSS-Fuzz has a rudimentary harness for levelDB which fails, so doesn’t appear maintained.
This PR adds a harness targeting CDBWrapper against an in-memory oracle to verify correctness.
A DeterministicEnv wraps levelDB’s memenv to eliminate non-determinism by capturing background compaction and running it at fuzzer-chosen points.
The fuzzer also controls the cache_bytes and max_file_size sizes so that small values trigger memtable flushes and compaction.
DrahtBot added the label
Fuzzing
on Mar 21, 2026
DrahtBot
commented at 1:12 am on March 21, 2026:
contributor
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviews
See the guideline for information on the review process.
A summary of reviews will appear here.
Conflicts
Reviewers, this pull request conflicts with the following ones:
#34866 (fuzz: target concurrent leveldb reads by andrewtoth)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
DrahtBot added the label
CI failed
on Mar 21, 2026
andrewtoth force-pushed
on Mar 21, 2026
DrahtBot removed the label
CI failed
on Mar 21, 2026
dbwrapper: make max_file_size a configurable DBParams field
Useful for fuzzing different values.
4ded02817c
dbwrapper: accept optional testing leveldb::Env in DBParams
Allow callers to inject a custom leveldb::Env via DBParams::testing_env,
which takes priority over the memory_only in-memory environment. This
enables fuzz harnesses to supply a deterministic environment.
ef8f152fbd
andrewtoth force-pushed
on Mar 21, 2026
andrewtoth force-pushed
on Mar 21, 2026
andrewtoth force-pushed
on Mar 21, 2026
DrahtBot added the label
CI failed
on Mar 22, 2026
andrewtoth force-pushed
on Mar 22, 2026
test: add fuzz harness for CDBWrapper
Introduces a libFuzzer harness that exercises CDBWrapper operations
against a std::map oracle, with a DeterministicEnv that captures LevelDB
background compaction for single-threaded determinism.
30e5ace1c9
andrewtoth force-pushed
on Mar 22, 2026
DrahtBot removed the label
CI failed
on Mar 22, 2026
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2026-03-23 09:13 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me