You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 25, 2025. It is now read-only.
The decoder in this branch is out of date with the bulk-memory-operations branch.
In particular, for data segments:
This repo:
let segment dat s =
let index = at var s in
let offset = const s in
let init = dat s in
{index; offset; init}
Bulk memory:
let data s =
match vu32 s with
| 0x00l ->
let dmode = at active_zero s in
let dinit = string s in
{dinit; dmode}
| 0x01l ->
let dmode = at passive s in
let dinit = string s in
{dinit; dmode}
| 0x02l ->
let dmode = at active s in
let dinit = string s in
{dinit; dmode}
| _ -> error s (pos s - 1) "invalid data segment kind"
I.e. it appears this repo is interpreting the reserved 0 byte as i32 index, when it should be a flags bitfield, with bit 6 indicating the presence of a memory segment index.