Skip to content
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

wasm_runtime_load 未初始化 WASIArguments 的 stdio 内容 #4081

Closed
lxbxl opened this issue Feb 13, 2025 · 2 comments · May be fixed by #4092
Closed

wasm_runtime_load 未初始化 WASIArguments 的 stdio 内容 #4081

lxbxl opened this issue Feb 13, 2025 · 2 comments · May be fixed by #4092

Comments

@lxbxl
Copy link

lxbxl commented Feb 13, 2025

无论是 wasm_load 还是 aot_load_from_aot_file,都未初始化 stdio 数组项。这导致 Windows 平台下 wasm_runtime_instantiate 内调用 wasm_runtime_init_wasi 时 stdinfd stdoutfd stderrfd 传入了 0。win_file.c 中使用的 INVALID_HANDLE_VALUE 值为 -1。

@lum1n0us
Copy link
Collaborator

Thanks for reporting it. #4092 is supposed to fix that. Please review it.

@lxbxl
Copy link
Author

lxbxl commented Feb 18, 2025

Thanks for reporting it. #4092 is supposed to fix that. Please review it.

os_get_invalid_handle 的返回类型不是原始的文件句柄。 #4092 (comment)

@lxbxl lxbxl closed this as completed Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants