WebAssembly / WebAssembly/binaryen
Non-UTF string builtins constants?
Nobody has claimed this yet.
- Dominant language
- WebAssembly
- Stars
- 8.6k
- Forks
- 885
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 69
Description
Discussing with @tlively , we thought it would be good to take the string builtins feature part of #7601 and land that, with the idea that the feature would add validation of string constants: non-utf8 ones would error.
I have code for that in sb.onlyfeat in my fork, however, I see that we can't parse such non-utf8 constants anyhow, e.g.
(module
(import "\'" "unpaired high surrogate \ED\A0\80 " (global $bad (ref extern)))
)
$bin/wasm-opt test/lit/validation/string-builtins.wast
Fatal: test/lit/validation/string-builtins.wast:2:52: error: expected import name
So I think that would need to be fixed first? (meanwhile, no one is at risk of trying to use such code, at least...)
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 reproducing the parser failure with $bin/wasm-opt and the example in test/lit/validation/string-builtins.wast. Read the string builtins work in sb.onlyfeat and determine how non-UTF-8 string constants should be parsed and validated; done means the relevant test input is accepted or rejected with the intended validation behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- wasm
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100