mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-19 14:01:08 +01:00
* Fixed compile-time error in spv fuzzer test.
error[E0061]: this function takes 2 arguments but 1 argument was supplied
--> fuzz_targets/spv_parser.rs:7:19
|
7 | let _result = Parser::new(data.into_iter()).parse();
| ^^^^^^^^^^^ ---------------- supplied 1 argument
| |
| expected 2 arguments
|
note: associated function defined here
--> /Users/evgeny.proydakov/repository/naga/src/front/spv/mod.rs:411:12
|
411 | pub fn new(data: I, options: &Options) -> Self {
| ^^^
error: aborting due to previous error
* Code review. Group imports
10 lines
308 B
Rust
10 lines
308 B
Rust
#![no_main]
|
|
use libfuzzer_sys::fuzz_target;
|
|
use naga::front::spv::{Parser, Options};
|
|
|
|
fuzz_target!(|data: Vec<u32>| {
|
|
// Ensure the parser can handle potentially malformed data without crashing.
|
|
let options = Options::default();
|
|
let _result = Parser::new(data.into_iter(), &options).parse();
|
|
});
|