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-opt hangs on Windows #7250

Open
Photosounder opened this issue Jan 29, 2025 · 2 comments
Open

wasm-opt hangs on Windows #7250

Photosounder opened this issue Jan 29, 2025 · 2 comments

Comments

@Photosounder
Copy link

I obtained binaryen on MSYS2 on Windows 10 using the command pacman -S mingw-w64-ucrt-x86_64-binaryen, which gives me "wasm-opt version 121". wasm-opt always hangs after writing an output file (the output file appears to be complete) and not even Ctrl-C can kill it (only the Task Manager can or closing the parent process), but returns properly when doing a simple wasm-opt --help, so I think this has something to do with closing the stream, although the file handle must be closed by the time it starts to hang because I can delete the file even though the program hangs.

Here's an example, the contents of the input file don't seem to influence the outcome:

$wasm-opt demo_nolibc.wasm -O0 -o opt-test.wasm -d
reading...
reading binary from demo_nolibc.wasm
Loading 'demo_nolibc.wasm'...
warning: no passes specified, not doing any work
writing...
writing binary to opt-test.wasm
Opening 'opt-test.wasm'

It hangs the same regardless of whether I run this from msys2's bash.exe or from cmd.exe.

@kripken
Copy link
Member

kripken commented Jan 29, 2025

Do you see this with the official builds of wasm-opt? If not, it might be a pacman build issue.

Official builds: https://github.com/WebAssembly/binaryen/releases/tag/version_121

@Photosounder
Copy link
Author

You're right, it must be a pacman issue, it doesn't hang with the official build.

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

No branches or pull requests

2 participants