diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2022-05-19 16:18:39 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-19 16:18:39 -0700 |
commit | fa3ffd0c2697fde7705495b52b139f7939f97925 (patch) | |
tree | 30f5de4996976446b9fcfb6f3ce02f33ea3f8c88 /src/wasm/wasm-binary.cpp | |
parent | 63df2257ce5215e672810cfb0d9c4e7952921e18 (diff) | |
download | binaryen-fa3ffd0c2697fde7705495b52b139f7939f97925.tar.gz binaryen-fa3ffd0c2697fde7705495b52b139f7939f97925.tar.bz2 binaryen-fa3ffd0c2697fde7705495b52b139f7939f97925.zip |
Fix binary parsing of the prototype nominal format (#4679)
We were checking that nominal modules only had a single element in their type
sections, but that's not correct for the prototype nominal binary format we
still want to support. The test for this missed catching the bug because it
wasn't actually parsing in nominal mode.
Diffstat (limited to 'src/wasm/wasm-binary.cpp')
-rw-r--r-- | src/wasm/wasm-binary.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp index 9cd7e79a7..afad575ce 100644 --- a/src/wasm/wasm-binary.cpp +++ b/src/wasm/wasm-binary.cpp @@ -1866,9 +1866,6 @@ void WasmBinaryBuilder::readMemory() { void WasmBinaryBuilder::readTypes() { BYN_TRACE("== readTypes\n"); TypeBuilder builder(getU32LEB()); - if (getTypeSystem() == TypeSystem::Nominal && builder.size() > 1) { - throwError("Nominal type sections must have a single element"); - } BYN_TRACE("num: " << builder.size() << std::endl); auto makeType = [&](int32_t typeCode) { |