-
Notifications
You must be signed in to change notification settings - Fork 29
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
[bug] Calling wasi_snapshot_preview1
path_open
without "extra steps" returns BADF (error 8)
#161
Comments
Found the issue using Broken:
Working:
For some reason
I've never seen this behavior (steps 1-4), both |
wasi_snapshot_preview1
path_open
always returns BADF (error 8)wasi_snapshot_preview1
path_open
without "warming up base fd" returns BADF (error 8)
wasi_snapshot_preview1
path_open
without "warming up base fd" returns BADF (error 8)wasi_snapshot_preview1
path_open
without "knowing base fd name" returns BADF (error 8)
wasi_snapshot_preview1
path_open
without "knowing base fd name" returns BADF (error 8)wasi_snapshot_preview1
path_open
without "extra steps" returns BADF (error 8)
Sorry for the long delay but somehow I overlooked the issue. This is a little tricky and I need to see why node and wasmtime is not failing. The I could assume they always start at 3 and throw later on if someone calls |
I came across this issue when I tried to call May I ask why it is said that
The spec of
I understand the |
When the following is compiled with WASI SDK to
test.wasm
:and executed using this setup:
VSCode properly reads
test.txt
file from the current workspace and print it to created terminal.However:
Trying to call
wasi_snapshot_preview1
path_open
function withfd=3, path="test.txt"
directly always returns EBADF (code 8).Minimal reproduction:
P.S: Arguments to the function were extracted by using
node:wasi
and logging calls of all import functions.Running
repro.wat
works fine in bothnode:wasi
andwasmtime
.The text was updated successfully, but these errors were encountered: