We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WASI fd_write and fd_read fails if the iovec describes a buffer such that its right boundary coincides with the memory right boundary.
fd_write
fd_read
Example:
There's 1 page of memory (0x10000 bytes).
Callng fd_read or fd_write with iovec[ 65532, 4 ]:
iovec[ 65532, 4 ]
FFFC FFFD FFFE FFFF ───┬────┬────┬────┬────╖ ...│ │ │ │ ║ ───┴────┴────┴────┴────╜ │←───── len: 4 ────→│ ↑ offset: 0xFFFC (65532)
The wasm memory size is just enough to fit this buffer. But the call errs with code 21.
If len is changed to 3, it works nicely.
If memory size is changed to 2 (2 * 0x10000 bytes), it works nicely.
wasmer version 0.14.1 OS x86_64 GNU/Linux (Ubuntu 18.04) Rust compiler is not used.
Run this .wat file with wasmer run
wasmer run
https://gist.github.com/subzey/7dd2cc27274b59322d78878f73a0944d
It should output TEST into stdout and exit with 0 exit code.
TEST
0
It outputs nothing and exists with 21.
21
This file executed with wasmtime works as expected.
wasmtime
The text was updated successfully, but these errors were encountered:
Thanks for reporting and for the minimal reproduce case, it's super helpful!
We will investigate soon :)
Sorry, something went wrong.
4861e6e
Successfully merging a pull request may close this issue.
Describe the bug
WASI
fd_write
andfd_read
fails if the iovec describes a buffer such that its right boundary coincides with the memory right boundary.Example:
There's 1 page of memory (0x10000 bytes).
Callng
fd_read
orfd_write
withiovec[ 65532, 4 ]
:The wasm memory size is just enough to fit this buffer. But the call errs with code 21.
If len is changed to 3, it works nicely.
If memory size is changed to 2 (2 * 0x10000 bytes), it works nicely.
wasmer version 0.14.1
OS x86_64 GNU/Linux (Ubuntu 18.04)
Rust compiler is not used.
Steps to reproduce
Run this .wat file with
wasmer run
https://gist.github.com/subzey/7dd2cc27274b59322d78878f73a0944d
Expected behavior
It should output
TEST
into stdout and exit with0
exit code.Actual behavior
It outputs nothing and exists with
21
.Additional context
This file executed with
wasmtime
works as expected.The text was updated successfully, but these errors were encountered: