WebAssembly / WebAssembly/binaryen
[wasm-validate] Error messages for name custom sections are not very concise
Open
Nobody has claimed this yet.
enhancement
help wanted
- Dominant language
- WebAssembly
- Stars
- 8.6k
- Forks
- 885
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 69
Description
- When I add a name custom section the the start of a file, the error reads:
expected function name count (9) <= function count (0). - Putting the name section after type section:
Memory section can not occur after Name section - Putting it after the memory section:
Global section can not occur after Name section - Putting it after the memory section:
Export section can not occur after Name section - Putting it after the memory section:
Start section can not occur after Name section - Putting it after the memory section:
Code section can not occur after Name section
I feel like the error message should include straight away that a name section must appear after the code section.
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
Start by locating the wasm-validate handling for name custom sections and reproduce the ordering cases listed in the issue. Done means the resulting errors clearly state that a name section must appear after the code section and remain concise for each invalid placement.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- wasm
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100