From ac8b0b71219a1c96d3dab4c9eeddbb4c8401cd1d Mon Sep 17 00:00:00 2001 From: Thomas Lively <7121787+tlively@users.noreply.github.com> Date: Fri, 3 Apr 2020 23:32:48 -0700 Subject: Do not emit multivalue events in fuzzer (#2723) Unless the multivalue feature is enabled. The validation for events recently changed to disallow events returning multiple items unless the multivalue feature is enabled, but the fuzzer was not updated accordingly. This PR fixes the glitch. --- src/tools/fuzzing.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/tools/fuzzing.h b/src/tools/fuzzing.h index 96dd43826..f08fac2d9 100644 --- a/src/tools/fuzzing.h +++ b/src/tools/fuzzing.h @@ -428,8 +428,9 @@ private: Type type = getConcreteType(); std::vector params; params.push_back(type); - Index numValues = upToSquared(MAX_PARAMS - 1); - for (Index i = 0; i < numValues + 1; i++) { + Index numValues = + wasm.features.hasMultivalue() ? upToSquared(MAX_PARAMS) : upTo(2); + for (Index i = 0; i < numValues; i++) { params.push_back(getConcreteType()); } auto* event = builder.makeEvent(std::string("event$") + std::to_string(i), -- cgit v1.2.3