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

locals exceed maximum error with wasm-pack on big match #981

Open
Tpt opened this issue Feb 23, 2021 · 3 comments
Open

locals exceed maximum error with wasm-pack on big match #981

Tpt opened this issue Feb 23, 2021 · 3 comments

Comments

@Tpt
Copy link

Tpt commented Feb 23, 2021

🐛 Bug description

Compiling oxigraph JS with wasm-pack fails with the following error:

error: failed to parse input file as wasm

Caused by:
    locals exceed maximum (at offset 10564186)

Here is a failing CI build and a working CI build from earlier the same day
Both builds use wasm-pack 1.9.1 and Rust 1.50 stable.

This error is caused by the big match introduced in quick-xml 0.21.

🤔 Expected Behavior

Proper compilation

👟 Steps to reproduce

git clone https://github.com/oxigraph/oxigraph
cd oxigraph/js
wasm-pack build --dev --target nodejs 

🌍 Your environment

Include the relevant details of your environment.
wasm-pack version: 0.9.1
rustc version: 1.50

@Tpt Tpt changed the title locals exceed maximum error with wasm-pack build after February 19th locals exceed maximum error with wasm-pack on big match Mar 10, 2021
@oovm
Copy link

oovm commented Mar 5, 2022

I have the same problem, is there a quick fix patch

@oovm
Copy link

oovm commented Mar 14, 2022

It seems that too many temporary variables are generated, the limit is at:
https://github.com/bytecodealliance/wasm-tools/blob/b5c3d98e40590512a3b12470ef358d5c7b983b15/crates/wasmparser/src/limits.rs#L29

Maybe this upper limit is fully considered, which too many variables caused by excessive inline.

@Sellig6792
Copy link

Still have this problem, this limit should be customizable, shouldn't it ?

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

3 participants