mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-19 14:01:08 +01:00
* Misc Repo Cleanup Tasks * Dependency Trimming * Dep cleanup * Restrict libfuzzer * Flip cfg * mod fuzz
13 lines
413 B
Rust
13 lines
413 B
Rust
#![no_main]
|
|
#[cfg(not(any(target_arch = "wasm32", target_os = "ios")))]
|
|
mod fuzz {
|
|
use libfuzzer_sys::fuzz_target;
|
|
use naga::front::spv::{Frontend, Options};
|
|
|
|
fuzz_target!(|data: Vec<u32>| {
|
|
// Ensure the parser can handle potentially malformed data without crashing.
|
|
let options = Options::default();
|
|
let _result = Frontend::new(data.into_iter(), &options).parse();
|
|
});
|
|
}
|