Summary:
Execute randomly generated operations on both a DB and a std::map,
then reopen the DB and make sure that iterating the DB produces the
same key-value pairs as iterating through the std::map.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/7762
Test Plan: cd fuzz && make db_map_fuzzer && ./db_map_fuzzer
Reviewed By: pdillinger
Differential Revision: D25437485
Pulled By: cheng-chang
fbshipit-source-id: 3a93f7efd046b194193e45d2ab1ad81565510781
Summary:
This PR adds a fuzzer to the project and infrastructure to integrate Rocksdb with OSS-Fuzz. OSS-Fuzz is a service run by Google that performs continuous fuzzing of important open source projects. The LevelDB project is also in being fuzzed by OSS-Fuzz (https://github.com/google/oss-fuzz/tree/master/projects/leveldb). Essentially, OSS-Fuzz will perform the fuzzing for you and email you bug reports, coverage reports etc. All we need is a set of email addresses that will receive this information.
For cross-referencing, the PR that adds the OSS-Fuzz logic is here: https://github.com/google/oss-fuzz/pull/4642
The `db_fuzzer` of the PR performs stateful fuzzing of Rocksdb by calling a sequence of Rockdb's APIs with random input in each fuzz iteration. Each fuzz iteration, thus, creates a new instance of Rocksdb and operates on this given instance. The goal is to test diverse states of Rocksdb and ensure no state lead to error conditions, e.g. memory corruption vulnerabilities.
The fuzzer is similar (although more complex) to the fuzzer that is currently being used to analyse Leveldb (https://github.com/google/oss-fuzz/blob/master/projects/leveldb/fuzz_db.cc)
Pull Request resolved: https://github.com/facebook/rocksdb/pull/7674
Reviewed By: pdillinger
Differential Revision: D25238536
Pulled By: cheng-chang
fbshipit-source-id: 610331c49a77eb68d3b1d7d5ef1b0ce230ac0630
Summary:
This is the initial PR to support adding fuzz tests to RocksDB.
It includes the necessary build infrastructure, and includes an example fuzzer.
There is also a README serving as the tutorial for how to add more tests.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/7685
Test Plan: Manually build and run the fuzz test according to README.
Reviewed By: pdillinger
Differential Revision: D25013847
Pulled By: cheng-chang
fbshipit-source-id: c91e3b337398d7f4d8f769fd5091cd080487b171