From 8954189545af1423f7885afc7b9bee5778c49253 Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Thu, 1 Dec 2022 15:34:55 +0000 Subject: [PATCH] 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 Reviewed-by: Dan Sinclair Commit-Queue: Ben Clayton --- src/tint/fuzzers/tint_common_fuzzer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tint/fuzzers/tint_common_fuzzer.cc b/src/tint/fuzzers/tint_common_fuzzer.cc index 1c24f35f28..15ab7d8b69 100644 --- a/src/tint/fuzzers/tint_common_fuzzer.cc +++ b/src/tint/fuzzers/tint_common_fuzzer.cc @@ -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; };