[v0.3] When does `DescriptorFlags` get checked?
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 32/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- linux, rust, wasm
- Domain
- operating-systems
Research direction
Start by reading the WASIp1 test in crates/test-programs/src/bin/preview1_file_write.rs and the adapter path in crates/wasi-preview1-component-adapter/src/lib.rs. Compare the observed write-via-stream behavior with the DescriptorFlags expectation and determine whether the issue needs a defined semantic decision or an implementation change, with the existing file-write test indicating completion.
Written by the indexing model from the issue text.
Description
In Wasmtime we have a WASIp1 test that asserts when a file is opened for reading only that writing to it fails. This is then additionally tested on WASIp2 via the WASIp1-to-WASIp2 adapter which bottoms out here. I've noticed that currently the way Wasmtime is implemented write-via-stream succeeds, but then a 0-length write to that stream fails with EBADF on Linux at least.
I don't believe that this was conscious behavior and it just happened to fall out of WASIp1 tests, but I wanted to get something on-the-record here as well. Should write-via-stream check the DescriptorFlags that the file was opened with and reject the call right then-and-there? Or does failure only happen when a write happens? (I assume the former, but wanted to check)
- Dominant language
- Rust
- Stars
- 5.8k
- Forks
- 333
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 3
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.
More from WebAssembly/WASI
-
[http] Request and Response's `new` method is reserved in many languages, inconsistent with sockets. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
WebAssembly/WASI#961 ·
-
P-http
Difficulty 1/5 Under an hour Newbie friendliness 90/100
WebAssembly/WASI#937 ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 72/100
WebAssembly/WASI#909 ·
-
P-clocks S-inactive
Difficulty 1/5 Under an hour Newbie friendliness 68/100
WebAssembly/WASI#687 ·
-
P-random S-inactive
Difficulty 1/5 Under an hour Newbie friendliness 75/100
WebAssembly/WASI#701 ·
All issues in WebAssembly/WASI
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100