WebAssembly / WebAssembly/WASI
[v0.3] Specify errors for `set-size`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.8k
- Forks
- 333
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 3
Description
POSIX says that ftruncate on a read-only file descriptor could result in EBADF or EINVAL: https://pubs.opengroup.org/onlinepubs/000095399/functions/ftruncate.html. We might as well just specify that it's always bad-descriptor; if the WASI implementation sees EINVAL, it can know if it's a file not open for writing, because the implementation has to keep some metadata on descriptors in any case.
Similarly, for a length that is too large, it can be EFBIG or EINVAL. Maybe specify just file-too-large ?
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 with the set-size specification and the linked POSIX ftruncate documentation. Resolve which errors should be specified for read-only descriptors and oversized lengths, then update the specification so the resulting behavior is explicit and consistent for WASI implementations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- wasm
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100