ReviewOS

zig-utils/zig-js

WebAssembly bulk memory: decode and validate segments and instructions

#276
Closed chris opened this 9 days ago ·
9 days ago

Parent: #272 Depends on: #262 Roadmap: #263, #142, #134

Implement the pinned bulk-memory binary and validator surface before enabling execution.

Acceptance:

  • Decode DataCount in its specified section order and validate its exact relationship to data indices.
  • Decode active, passive, and declarative element segment forms plus active/passive data forms.
  • Decode exact immediates for memory.init/data.drop/memory.copy/memory.fill/table.init/elem.drop/table.copy.
  • Validate index spaces, element/reference types, memory/table compatibility, operand order, and stable malformed/disabled-feature diagnostics.
  • Add focused binary and validator tests for every encoding family and rejection class.
9 days ago

Completed in d5eef86a. The IR and decoder cover DataCount in its specified order, all eight element forms, all data forms, and exact immediates for subopcodes 8-14. Validation covers segment/index/type/operand/DataCount rules with stable disabled and malformed diagnostics. Decoder evidence is 16/16 and the dedicated validator acceptance/rejection filter is 4/4; the combined Wasm checkpoint is 159/159, all with zero skips/failures/leaks.

Sign in to comment on this issue.