From 0d9bb2411a1d368dad7568fe293aefa87d6e3495 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 23 Dec 2025 13:39:30 -0800 Subject: [PATCH] Check isBasic before getBasic in validator --- src/wasm/wasm-validator.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp index 62efe49f007..601222285fc 100644 --- a/src/wasm/wasm-validator.cpp +++ b/src/wasm/wasm-validator.cpp @@ -198,6 +198,10 @@ struct ValidationInfo { Expression* curr, const char* text, Function* func = nullptr) { + if (!ty.isBasic()) { + fail(std::string(text) + " (not basic)", curr, func); + return; + } switch (ty.getBasic()) { case Type::i32: case Type::i64: