DAE2 crashes on call.without.effects with a non ref.func expression
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Read src/passes/DeadArgumentElimination2.cpp around line 624, where DAE2 assumes the last call.without.effects argument is a ref.func. Reproduce the crash with wasm-opt --dae2 and the WAST module in the issue, then check the relevant DAE2 tests. Done means this non-ref.func argument no longer triggers the assertion and the regression is covered.
Written by the indexing model from the issue text.
Description
DAE2 assumes that the last argument to call.without.effect is a ref.func expression link.
Minimal repro:
wasm-opt --dae2
(module
(import "binaryen-intrinsics" "call.without.effects" (func $cwe (param funcref) (result i32)))
(type $target-type (func (result i32)))
(func $caller (param $ref (ref $target-type))
(drop (call $cwe (local.get $ref)))
)
)
wasm-opt: src/wasm.h:832: T* wasm::Expression::cast() [with T = wasm::RefFunc]: Assertion `int(_id) == int(T::SpecificId)' failed.
- Dominant language
- WebAssembly
- Stars
- 8.7k
- Forks
- 913
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 92
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from WebAssembly/binaryen
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
WebAssembly/binaryen#9135 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 Half a day Newbie friendliness 76/100
WebAssembly/binaryen#9018 · 3 comments ·
Maintainers usually reply within 1 day
-
Remove `call.without.effects` intrinsicPossibly taken @stevenfontanella claimed this 2 days ago. Open
WebAssembly/binaryen#9399 · 1 assignee ·
Maintainers usually reply within 1 day
-
Inlining: --inline-max-combined-binary-size is not enforced when several functions are inlined into one caller in the same iterationPossibly taken @kripken claimed this 6 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 58/100
WebAssembly/binaryen#9384 · 1 assignee ·
Maintainers usually reply within 1 day
-
Add a pass to relax nullabilities of definitionsPossibly taken @stevenfontanella claimed this 13 days ago. Openenhancement
WebAssembly/binaryen#9352 · 1 assignee ·
Maintainers usually reply within 1 day
All issues in WebAssembly/binaryen
Similar issues
-
area:compiler effort:S impact:med platform:windows type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
area:Analysis enhancement
Difficulty 1/5 1-3 hours Newbie friendliness 69/100
facebookresearch/atlas-lean#5118 ·
Maintainers usually reply within 1 day
-
bug css P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
fizzbee-io/fizzbee#478 ·
Maintainers usually reply within 1 day