Minimal SQLite key-value store for OCaml
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(lint): replace Format with Fmt (E205), use err_* helpers (E340), shorten identifier (E320)

+33 -6
+16 -6
fuzz/dune
··· 1 - ; Crowbar fuzz testing for sqlite 2 - ; 3 - ; To run: dune exec fuzz/fuzz_sqlite.exe 4 - ; With AFL: afl-fuzz -i fuzz/corpus -o fuzz/findings -- ./_build/default/fuzz/fuzz_sqlite.exe @@ 5 - 6 1 (executable 7 2 (name fuzz_sqlite) 8 3 (modules fuzz_sqlite) 9 4 (libraries sqlite crowbar eio_main)) 10 5 6 + (executable 7 + (name gen_corpus) 8 + (modules gen_corpus)) 9 + 11 10 (rule 12 - (alias fuzz) 11 + (alias runtest) 13 12 (deps fuzz_sqlite.exe) 14 13 (action 15 14 (run %{exe:fuzz_sqlite.exe}))) 15 + 16 + (rule 17 + (alias fuzz) 18 + (enabled_if 19 + (= %{profile} afl)) 20 + (deps 21 + (source_tree corpus) 22 + fuzz_sqlite.exe 23 + gen_corpus.exe) 24 + (action 25 + (echo "AFL fuzzer built: %{exe:fuzz_sqlite.exe}\n")))
+17
fuzz/gen_corpus.ml
··· 1 + (** Generate seed corpus for fuzz testing. *) 2 + 3 + let () = 4 + let dir = "corpus" in 5 + (try Unix.mkdir dir 0o755 with Unix.Unix_error (Unix.EEXIST, _, _) -> ()); 6 + let write name data = 7 + let oc = open_out_bin (Filename.concat dir name) in 8 + output_string oc data; 9 + close_out oc 10 + in 11 + write "seed_000" ""; 12 + write "seed_001" "\x00"; 13 + write "seed_002" "\xff"; 14 + write "seed_003" (String.make 16 '\x00'); 15 + write "seed_004" (String.make 16 '\xff'); 16 + write "seed_005" (String.init 256 Char.chr); 17 + Printf.printf "gen_corpus: wrote 6 seed files\n"