From 02f8c56aad18a2715904d1d5e0951b25bf7749c3 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 1 Feb 2021 21:06:47 +0000 Subject: [GC] Don't emit i31ref in fuzzer (#3531) That type is non-nullable, so we need to disable it until we fully support that. Right now if we emit such locals we immediately get a validation error. With this change the fuzzer can run at least a few thousand iterations with no errors once more. --- src/tools/fuzzing.h | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/tools/fuzzing.h b/src/tools/fuzzing.h index 22d9a12e6..208bc3983 100644 --- a/src/tools/fuzzing.h +++ b/src/tools/fuzzing.h @@ -337,13 +337,13 @@ private: options.push_back(Type::externref); if (wasm.features.hasGC()) { options.push_back(Type::eqref); - options.push_back(Type::i31ref); + // TODO: i31ref, dataref, etc. } } break; case Type::eqref: if (wasm.features.hasGC()) { - options.push_back(Type::i31ref); + // TODO: i31ref, dataref, etc. } break; default: @@ -1108,8 +1108,8 @@ private: if (type == Type::i32) { options.add(FeatureSet::ReferenceTypes, &Self::makeRefIsNull); options.add(FeatureSet::ReferenceTypes | FeatureSet::GC, - &Self::makeRefEq, - &Self::makeI31Get); + &Self::makeRefEq); + // TODO: makeI31Get } if (type.isTuple()) { options.add(FeatureSet::Multivalue, &Self::makeTupleMake); @@ -3035,10 +3035,9 @@ private: .add(FeatureSet::ReferenceTypes, Type::funcref, Type::externref) .add(FeatureSet::ReferenceTypes | FeatureSet::GC, Type::anyref, - Type::eqref, - Type::i31ref)); + Type::eqref)); // TODO: emit typed function references types - // TODO: dataref + // TODO: i31ref, dataref } Type getSingleConcreteType() { return pick(getSingleConcreteTypes()); } @@ -3049,16 +3048,16 @@ private: .add(FeatureSet::ReferenceTypes, Type::funcref, Type::externref) .add(FeatureSet::ReferenceTypes | FeatureSet::GC, Type::anyref, - Type::eqref, - Type::i31ref)); - // TODO: dataref + Type::eqref)); + // TODO: i31ref, dataref } Type getReferenceType() { return pick(getReferenceTypes()); } std::vector getEqReferenceTypes() { return items(FeatureOptions().add( - FeatureSet::ReferenceTypes | FeatureSet::GC, Type::eqref, Type::i31ref)); + FeatureSet::ReferenceTypes | FeatureSet::GC, Type::eqref)); + // TODO: i31ref, dataref } Type getEqReferenceType() { return pick(getEqReferenceTypes()); } -- cgit v1.2.3