tint_common_fuzzer: Don't attempt to use an invalid program

validate_program was not returning 0 for invalid programs that did not contain diagnostics with a severity greater than error.
This lead to broken behavior in logic that used the program.

Bug: chromium:1392853
Change-Id: Id860e266cfe24ade955edf4f2f2a9c26c2e117fa
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/112560
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
This commit is contained in:
Ben Clayton 2022-12-01 15:34:55 +00:00 committed by Dawn LUCI CQ
parent 527e38b68b
commit 8954189545
1 changed files with 1 additions and 1 deletions

View File

@ -209,11 +209,11 @@ int CommonFuzzer::Run(const uint8_t* data, size_t size) {
"transformed into an invalid output program");
}
}
return 0;
}
program = std::move(out.program);
RunInspector(&program);
return 1;
};