Skip to content

Commit 5fd29cd

Browse files
zoddicusdawn-scoped@luci-project-accounts.iam.gserviceaccount.com
authored andcommitted
[fuzz][ir] Set options when running non-concurrently
There are two execution paths in tint_ir_fuzzer, one for concurrent execution and one for serial execution. Some of the options that are set in the concurrent path are not set in the serial path. This is just a spot fix for an issue that is causing problems right now. There is a planned refactoring of the fuzzer implementations that should more systematically address issues like this. Bug: 506912899 Change-Id: Ic037d5018598a43fc2ac3c1345f3e6d3f659277a Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/305655 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: dan sinclair <dsinclair@chromium.org> Commit-Queue: dan sinclair <dsinclair@chromium.org> Auto-Submit: Ryan Harrison <rharrison@chromium.org> Reviewed-by: James Price <jrprice@google.com>
1 parent 4f88e83 commit 5fd29cd

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/tint/cmd/fuzz/ir/fuzz.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ void Run(const std::function<tint::core::ir::Module()>& acquire_module,
205205
std::cout << " • Running: " << currently_running << '\n';
206206
}
207207
auto mod = acquire_module();
208+
mod.dump_ir_when_validating = context.options.dump_ir_when_validating;
208209
if (tint::core::ir::Validate(mod, fuzzer.pre_capabilities,
209210
"start " + std::string(currently_running)) !=
210211
tint::Success) {
@@ -217,6 +218,10 @@ void Run(const std::function<tint::core::ir::Module()>& acquire_module,
217218
continue;
218219
}
219220

221+
// Enable validation assertions.
222+
// Any validation failure after this point is a bug in Tint which we want to find.
223+
mod.enable_validation_asserts = true;
224+
220225
if (auto result = fuzzer.fn(mod, context, data); result != Success) {
221226
if (options.verbose) {
222227
std::cout << " Failed to execute fuzzer: " << result.Failure() << "\n";

0 commit comments

Comments
 (0)