diff options
-rwxr-xr-x | scripts/fuzz_opt.py | 2 | ||||
-rw-r--r-- | src/tools/fuzzing.h | 4 | ||||
-rw-r--r-- | src/wasm/wasm-type.cpp | 6 |
3 files changed, 8 insertions, 4 deletions
diff --git a/scripts/fuzz_opt.py b/scripts/fuzz_opt.py index 58026e494..fa42c5640 100755 --- a/scripts/fuzz_opt.py +++ b/scripts/fuzz_opt.py @@ -34,7 +34,7 @@ assert sys.version_info.major == 3, 'requires Python 3!' # feature options that are always passed to the tools. # * multivalue: https://github.com/WebAssembly/binaryen/issues/2770 -CONSTANT_FEATURE_OPTS = ['--all-features', '--disable-multivalue'] +CONSTANT_FEATURE_OPTS = ['--all-features'] INPUT_SIZE_MIN = 1024 INPUT_SIZE_MEAN = 40 * 1024 diff --git a/src/tools/fuzzing.h b/src/tools/fuzzing.h index 91a808d32..fb83882c2 100644 --- a/src/tools/fuzzing.h +++ b/src/tools/fuzzing.h @@ -327,8 +327,10 @@ private: options.push_back(type); // includes itself switch (type.getSingle()) { case Type::anyref: + if (wasm.features.hasExceptionHandling()) { + options.push_back(Type::exnref); + } options.push_back(Type::funcref); - options.push_back(Type::exnref); // falls through case Type::funcref: case Type::exnref: diff --git a/src/wasm/wasm-type.cpp b/src/wasm/wasm-type.cpp index d1cdf6a81..7d51cc10e 100644 --- a/src/wasm/wasm-type.cpp +++ b/src/wasm/wasm-type.cpp @@ -199,14 +199,16 @@ Type Type::reinterpret() const { } FeatureSet Type::getFeatures() const { - auto getSingleFeatures = [](Type t) { + auto getSingleFeatures = [](Type t) -> FeatureSet { switch (t.getSingle()) { case Type::v128: return FeatureSet::SIMD; + case Type::funcref: case Type::anyref: + case Type::nullref: return FeatureSet::ReferenceTypes; case Type::exnref: - return FeatureSet::ExceptionHandling; + return FeatureSet::ReferenceTypes | FeatureSet::ExceptionHandling; default: return FeatureSet::MVP; } |