summaryrefslogtreecommitdiff
path: root/src/passes/TupleOptimization.cpp
diff options
context:
space:
mode:
authorRikito Taniguchi <rikiriki1238@gmail.com>2024-06-04 04:42:02 +0900
committerGitHub <noreply@github.com>2024-06-03 19:42:02 +0000
commit9347a223fcc1b6c297805b3c37fe1e7473158720 (patch)
tree45d356a79b828c5ff948626a7cb7bd1c2654e128 /src/passes/TupleOptimization.cpp
parent1f2cd4f7b51c7afd6a6cafc4e48286e850bb36bd (diff)
downloadbinaryen-9347a223fcc1b6c297805b3c37fe1e7473158720.tar.gz
binaryen-9347a223fcc1b6c297805b3c37fe1e7473158720.tar.bz2
binaryen-9347a223fcc1b6c297805b3c37fe1e7473158720.zip
Fix binary parser of declarative element segments (#6618)
The parser was incorrectly handling the parsing of declarative element segments whose `init` is a `vec(expr)`. https://webassembly.github.io/spec/core/binary/modules.html#element-section Binry parser was simply reading a single `u32LEB` value for `init` instead of parsing a expression regardless `usesExpressions = true`. This commit updates the `WasmBinaryReader::readElementSegments` function to correctly parse the expressions for declarative element segments by calling `readExpression` instead of `getU32LEB` when `usesExpressions = true`. Resolves the parsing exception: "[parse exception: bad section size, started at ... not being equal to new position ...]" Related discussion: https://github.com/tanishiking/scala-wasm/issues/136
Diffstat (limited to 'src/passes/TupleOptimization.cpp')
0 files changed, 0 insertions, 0 deletions