Skip to content

dune-universe/ocaml-afl-persistent

 
 

Repository files navigation

afl-persistent - persistent-mode afl-fuzz for ocaml

by using AflPersistent.run, you can fuzz things really fast:

let f () =
  let s = read_line () in
  match Array.to_list (Array.init (String.length s) (String.get s)) with
    ['s'; 'e'; 'c'; 'r'; 'e'; 't'; ' '; 'c'; 'o'; 'd'; 'e'] -> failwith "uh oh"
  | _ -> ()

let _ = AflPersistent.run f

compile with a version of ocaml that supports afl. that means trunk for now, but the next release (4.05) will work too, and pass the -afl-instrument option to ocamlopt.

About

persistent-mode afl-fuzz for ocaml

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • OCaml 63.0%
  • Shell 37.0%