tint_ir_fuzzer: fix -concurrent runs

When run concurrently, each thread needs its own copy of the module.

Bug: 383350512
Change-Id: Idac7d456e45214beffdcb748d10af15ca51329c3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/218874
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
diff --git a/src/tint/cmd/fuzz/ir/main_fuzz.cc b/src/tint/cmd/fuzz/ir/main_fuzz.cc
index 03a07dd..95e9246 100644
--- a/src/tint/cmd/fuzz/ir/main_fuzz.cc
+++ b/src/tint/cmd/fuzz/ir/main_fuzz.cc
@@ -53,7 +53,7 @@
     /// As the fuzzers are free to mutate the module, we need to deserialize a new module for each
     /// sub-fuzzer. Because the protobuf may error when deserializing and the module may be invalid,
     /// we early deserialize. If this fails, then we do not call Run().
-    std::optional<tint::core::ir::Module> module;
+    thread_local std::optional<tint::core::ir::Module> module;
     {
         auto decoded = tint::core::ir::binary::Decode(pb.module());
         if (decoded != tint::Success) {