Define a fuzz target for the parser
This commit is contained in:
committed by
Chris Fallin
parent
cfaa35d8c0
commit
825258939b
9
cranelift/isle/fuzz/fuzz_targets/parse.rs
Normal file
9
cranelift/isle/fuzz/fuzz_targets/parse.rs
Normal file
@@ -0,0 +1,9 @@
|
||||
#![no_main]
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
|
||||
fuzz_target!(|s: &str| {
|
||||
let lexer = isle::lexer::Lexer::from_str(s, "fuzz-input.isle");
|
||||
let mut parser = isle::parser::Parser::new(lexer);
|
||||
let _ = parser.parse_defs();
|
||||
});
|
||||
Reference in New Issue
Block a user