WebAssembly / WebAssembly/spec
Not enough unreachability/side-effects tests
Open
Nobody has claimed this yet.
- Dominant language
- WebAssembly
- Stars
- 3.5k
- Forks
- 539
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 13
Description
While a real compiler should never emit code like
(module
(global $a (mut i32) (i32.const 0))
(func (export "get-a") (result i32) (global.get $a))
(func $set-and-return-a (result i32) (global.set $a (i32.const 1)) (global.get $a))
(func (export "call-unreachable") (result i32)
(call $set-and-return-a)
(unreachable)
)
)
(assert_trap (invoke "call-unreachable") "unreachable")
(assert_return (invoke "get-a") (i32.const 1))
it would be nice to see more tests like this.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no file or test entry point. Start with the WAST example and locate the existing WebAssembly tests for unreachability and side effects; add comparable cases and confirm they verify both the expected trap and side-effect result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- wasm
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100