WebAssembly / WebAssembly/spec

[spectec] Missing and wrong side conditions in the middle-end

Open
#2,196 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
WebAssembly
Stars
3.5k
Forks
539
Avg merge
2d 1h
Merged PRs (30d)
13

Description

I think for MemE the side condition about the sequence being non-empty is wrong (https://github.com/WebAssembly/spec/blob/main/spectec/src/middlend/sideconditions.ml#L63).

Also there should be side conditions for SliceE, UpdE and ExtE.

Opening this ticket just for the record. I think I'll do a PR with the flag controlling side conditions on functions, after we backport the middle-end from the WasmDSL repo.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with spectec/src/middlend/sideconditions.ml at line 63 and inspect the existing MemE side condition alongside the handling of SliceE, UpdE, and ExtE. Check the middle-end backport context first; done means the MemE condition is corrected and the missing conditions are represented consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
wasm
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.