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

0.2.86->0.2.87 introduces a coredump in wasm-opt that continues to latest released version #4123

Closed
gilescope opened this issue Sep 21, 2024 · 3 comments
Labels

Comments

@gilescope
Copy link

gilescope commented Sep 21, 2024

Describe the Bug

On an arm based m3 mac (and in docker as amd86), versions above 0.2.86 lead to a core dump in wasm-opt.

Smoking PR is likely this one: #3463

Steps to Reproduce

At least the code is open source to reproduce this one:

  1. git clone https://github.com/gilescope/dotsamaworld.git
  2. git checkout aaa62e360b641c0ebac4ccfac3de60b69be664fc
  3. bump wasm-bindgen to > 0.2.86 in Cargo.toml
  4. trunk build --release ( https://trunkrs.dev/ )
  5. See error:
2024-09-21T19:50:57.044057Z  INFO calling wasm-opt
2024-09-21T19:50:58.448578Z ERROR ❌ error
error from build pipeline

Caused by:
    0: HTML build pipeline failed (2 errors), showing first
    1: error from asset pipeline
    2: wasm-opt call to executable '/Users/gilescope/.cargo/bin/wasm-opt' with args: '["--output=/Users/gilescope/git/dotsamaworld/target/wasm-opt/release/app-25b623b3922d6169_bg.wasm", "-Oz", "/Users/gilescope/git/dotsamaworld/dist/.stage/app-25b623b3922d6169_bg.wasm"]' returned a bad status: signal: 11 (SIGSEGV)
Error: error from build pipeline

Expected Behavior

should compile cleanly and optimise wasm cleanly.

Actual Behavior

segmentation fault  /Users/gilescope/.cargo/bin/wasm-opt  -Oz

Additional Context

wasm-opt version 116 (version_116) (same for versions back to 105 that I could easily try)

If >=0.2.87 is using a newer version of wasm-opt then it could well be something in the c/c++ of wasm opt project where the problem is rather than here.

@gilescope gilescope added the bug label Sep 21, 2024
@gilescope
Copy link
Author

gilescope commented Sep 21, 2024

First question is can anyone reproduce it?

@gilescope
Copy link
Author

gilescope commented Sep 22, 2024

I tried reverting #3463 on top of master but it didn't seem to be the cause. If not that I'm not sure what's causing it. (underlying problem is that wasm-opt isn't written in rust!)

@daxpedda
Copy link
Collaborator

Considering the segfault, this looks like a problem in wasm-opt to me rather then in wasm-bindgen.

It might of course turn out that there is some faulty output coming from wasm-bindgen, but that would be hard to investigate without even a proper error message.

@daxpedda daxpedda closed this as not planned Won't fix, can't repro, duplicate, stale Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants