-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
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
write success, but not expected. #8818
Labels
bug
Incorrect behavior in the current implementation that needs fixing
Comments
alexcrichton
added a commit
to alexcrichton/wasmtime
that referenced
this issue
Jun 17, 2024
When a 0-length write is performed try to send the write all the way to the underlying file descriptor to at least check that it's valid to write. Closes bytecodealliance#8818
alexcrichton
added a commit
to alexcrichton/wasmtime
that referenced
this issue
Jun 17, 2024
When a 0-length write is performed try to send the write all the way to the underlying file descriptor to at least check that it's valid to write. Closes bytecodealliance#8818
Thanks for the detailed report! (and for the others too) |
github-merge-queue bot
pushed a commit
that referenced
this issue
Jun 17, 2024
* Force some more permission checks with 0-length writes When a 0-length write is performed try to send the write all the way to the underlying file descriptor to at least check that it's valid to write. Closes #8818 * Update crates/test-programs/src/bin/preview1_file_write.rs Co-authored-by: Trevor Elliott <awesomelyawesome@gmail.com> * Allow a second error for Windows as well --------- Co-authored-by: Trevor Elliott <awesomelyawesome@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Test Case
The c test case is:
Steps to Reproduce
(1)compile to wasm:
./wasi-sdk-21.0/bin/clang --target=wasm32-unkown-wasi --sysroot=./wasi-sdk-21.0/share/wasi-sysroot test.c -o test.wasm
(2)Running wasm:
(Before run the Wasm file, file subdir_2/subdir_1/subdir_2/subdir_3/subfile_3 exists.)
wasmtime run --dir=. test.wasm
Expected Results
Print:
This is what WAMR, WasmEdge and Linux native code do.
Actual Results
wasmtime prints:
The file is opened with O_RDONLY.
Maybe write successful message is not expected.
Versions and Environment
Wasmtime version or commit: 19.0.2
Operating system: Ubuntu 20.04
Architecture: x86_64
The text was updated successfully, but these errors were encountered: