Fork of https://github.com/oxigraph/oxigraph.git for the purpose of NextGraph project
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
613 B
27 lines
613 B
2 years ago
|
#![no_main]
|
||
|
use lazy_static::lazy_static;
|
||
|
use libfuzzer_sys::fuzz_target;
|
||
|
use oxigraph::io::DatasetFormat;
|
||
|
use oxigraph::sparql::Query;
|
||
|
use oxigraph::store::Store;
|
||
|
|
||
|
lazy_static! {
|
||
|
static ref STORE: Store = {
|
||
|
let store = Store::new().unwrap();
|
||
|
store
|
||
|
.load_dataset(
|
||
|
sparql_smith::DATA_TRIG.as_bytes(),
|
||
|
DatasetFormat::TriG,
|
||
|
None,
|
||
|
)
|
||
|
.unwrap();
|
||
|
store
|
||
|
};
|
||
|
}
|
||
|
|
||
|
fuzz_target!(|data: sparql_smith::Query| {
|
||
|
if let Ok(q) = Query::parse(&data.to_string(), None) {
|
||
|
STORE.query(q).unwrap();
|
||
|
}
|
||
|
});
|