Add fuzzer running on parse_query
This commit is contained in:
parent
b237512564
commit
89688faee8
3
parser/fuzz/.gitignore
vendored
Normal file
3
parser/fuzz/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
target
|
||||||
|
corpus
|
||||||
|
artifacts
|
25
parser/fuzz/Cargo.toml
Normal file
25
parser/fuzz/Cargo.toml
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
[package]
|
||||||
|
name = "async-graphql-parser-fuzz"
|
||||||
|
version = "0.0.0"
|
||||||
|
authors = ["Automatically generated"]
|
||||||
|
publish = false
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
|
[package.metadata]
|
||||||
|
cargo-fuzz = true
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
libfuzzer-sys = "0.4"
|
||||||
|
|
||||||
|
[dependencies.async-graphql-parser]
|
||||||
|
path = ".."
|
||||||
|
|
||||||
|
# Prevent this from interfering with workspaces
|
||||||
|
[workspace]
|
||||||
|
members = ["."]
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "parse_query"
|
||||||
|
path = "fuzz_targets/parse_query.rs"
|
||||||
|
test = false
|
||||||
|
doc = false
|
6
parser/fuzz/fuzz_targets/parse_query.rs
Normal file
6
parser/fuzz/fuzz_targets/parse_query.rs
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
#![no_main]
|
||||||
|
use libfuzzer_sys::fuzz_target;
|
||||||
|
|
||||||
|
fuzz_target!(|data: &str| {
|
||||||
|
async_graphql_parser::parse_query(data);
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user