From 50cf54064370af66c72227166d103424086f5b27 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 19 Dec 2023 13:02:54 -0800 Subject: [PATCH] fix --- src/wasm/wasm-validator.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp index c1b4a86e78d..8c165b70042 100644 --- a/src/wasm/wasm-validator.cpp +++ b/src/wasm/wasm-validator.cpp @@ -2123,6 +2123,11 @@ void FunctionValidator::visitDrop(Drop* curr) { curr->value->type == Type::unreachable, curr, "can only drop a valid value"); + if (curr->value->type.isTuple()) { + shouldBeTrue(getModule()->features.hasMultivalue(), + curr, + "Tuples drops are not allowed unless multivalue is enabled"); + } } void FunctionValidator::visitReturn(Return* curr) {