Commit d381a1f
authored
wasip3: Improve/fix handling of buffered reads (#793)
This updates the code path that performs a buffered read for a stream
when zero-length reads/writes are determined to not signal readiness
correctly. Specifically a defensive assertion that this is a
nonzero-length read is added and additionally in the case that I/O
completes immediately the return code is handled appropriately.
Unfortunately I don't know of a way to test this as it's not testable
from Wasmtime today and the file streams implementation in Wasmtime ends
up sort of accidentally respecting the zero-length protocol (sort of).
Thus, for now, this is just a code change until more comprehensive
testing such as #766 is implemented.1 parent 6024e11 commit d381a1f
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| 241 | + | |
241 | 242 | | |
242 | 243 | | |
243 | 244 | | |
| |||
252 | 253 | | |
253 | 254 | | |
254 | 255 | | |
255 | | - | |
| 256 | + | |
256 | 257 | | |
257 | 258 | | |
258 | 259 | | |
| |||
0 commit comments