diff options
author | Alon Zakai <azakai@google.com> | 2021-02-01 21:06:47 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-01 13:06:47 -0800 |
commit | 02f8c56aad18a2715904d1d5e0951b25bf7749c3 (patch) | |
tree | f24b0313226a3803a32f30771b782c08b4076048 /src/tools/fuzzing.h | |
parent | a8a2693fa6382e7e07feb6807d8681ecaf740cc3 (diff) | |
download | binaryen-02f8c56aad18a2715904d1d5e0951b25bf7749c3.tar.gz binaryen-02f8c56aad18a2715904d1d5e0951b25bf7749c3.tar.bz2 binaryen-02f8c56aad18a2715904d1d5e0951b25bf7749c3.zip |
[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.
Diffstat (limited to 'src/tools/fuzzing.h')
-rw-r--r-- | src/tools/fuzzing.h | 21 |
1 files changed, 10 insertions, 11 deletions
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<Type> getEqReferenceTypes() { return items(FeatureOptions<Type>().add( - FeatureSet::ReferenceTypes | FeatureSet::GC, Type::eqref, Type::i31ref)); + FeatureSet::ReferenceTypes | FeatureSet::GC, Type::eqref)); + // TODO: i31ref, dataref } Type getEqReferenceType() { return pick(getEqReferenceTypes()); } |