-
Notifications
You must be signed in to change notification settings - Fork 745
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] Unable compile optimized wasm file at old node.js version #5656
Comments
Looks like this is due to the sign-extend proposal operations. LLVM and Binaryen have recently flipped them on by default. But running with Is there a chance |
Yes i'm sure the flag is passed, here's my command:
PS. |
Very strange, it works for me:
I see the same with To debug this, can you build and test |
I tried build from source, and got version PS.I tried opt with version 110, the file is different with those above, but still fail when compiling, is there a chance that we got with wrong problem? |
Adding After that, I'd add debug prints before and after the feature checks for sign-ext in OptimizeInstructions, like here: binaryen/src/passes/OptimizeInstructions.cpp Line 498 in edf9087
If you see that condition being true despite passing |
Command: |
Ok, that shows the sign-ext feature is enabled. So the next question is why You can add some logging here to make sure that that flag is received: binaryen/src/tools/tool-options.h Line 47 in bd1822d
Logging the values around here could verify nothing goes wrong after: binaryen/src/tools/tool-options.h Line 185 in bd1822d
If that isn't enough, the next thing I'd log is whether the features section is a factor: binaryen/src/wasm/wasm-binary.cpp Line 3608 in bd1822d
(but I don't remember offhand how that works with |
That output suggests there is a features section in your file, which enables that option. The features section can enable and disable features like commandline flags can. I don't see the features section in
Anyhow, aside from the confusion in files, the way to fix this for you is to either
|
Thanks, |
Version:
wasm-opt version 112 (version_112)
Command args:
-O4 -g
Node.js Version:
v8.9.3
Got this error when calling
WebAssembly.Module
:Note that upgrade node.js or disable optimize can solve this error.
File Pack: pack.zip
Origin wasm file:
binary.wasm
Optimized wasm file:
binary.wasm-opt.wasm
wasm-opt binary archive:
wasm-opt
PS. neither pass
--mvp-features
flag nor downgrade to version 110 worked.The text was updated successfully, but these errors were encountered: