mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-22 14:55:05 +00:00
2a9fdf9aa1
* Misc Repo Cleanup Tasks * Dependency Trimming * Dep cleanup * Restrict libfuzzer * Flip cfg * mod fuzz
15 lines
481 B
Rust
15 lines
481 B
Rust
#![no_main]
|
|
#[cfg(not(any(target_arch = "wasm32", target_os = "ios")))]
|
|
mod fuzz {
|
|
use libfuzzer_sys::fuzz_target;
|
|
|
|
fuzz_target!(|module: naga::Module| {
|
|
use naga::valid as v;
|
|
// Check if the module validates without errors.
|
|
//TODO: may also fuzz the flags and capabilities
|
|
let mut validator =
|
|
v::Validator::new(v::ValidationFlags::all(), v::Capabilities::default());
|
|
let _result = validator.validate(&module);
|
|
});
|
|
}
|