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

Update Binaryen #2683

Merged
merged 4 commits into from Apr 11, 2023
Merged

Update Binaryen #2683

merged 4 commits into from Apr 11, 2023

Conversation

dcodeIO
Copy link
Member

@dcodeIO dcodeIO commented Apr 8, 2023

Updates Binaryen to latest nightly, including the relevant API changes.

Note that this is broken right now, in that std/map and std/set fail to optimize with a RuntimeError: null function or function signature mismatch, indicating that something is off. Error message is the same as reported in #2682.

  • I've read the contributing guidelines
  • I've added my name and email to the NOTICE file

@dcodeIO dcodeIO marked this pull request as ready for review April 10, 2023 09:51
@MaxGraey
Copy link
Member

I'm wondering is it possible to fix this issue without increasing stack with this PR?
WebAssembly/binaryen#5646

@dcodeIO
Copy link
Member Author

dcodeIO commented Apr 10, 2023

The other PR seems to address stack overflows in setMemory only, where previously all the data segments were allocated on the stack, easily overflowing it, hence proposing that these are instead allocated on the heap. The issues seen here, however, appear to happen during optimizations, more precisely in chains of PrecomputingExpressionRunner::visit that overflow the stack. From a quick glimpse, what happens is that visitBinary for example creates additional expression runners, incl. for LHS and RHS, so if there are sufficiently nested binaries within binaries for instance, the stack overflows. Makes me wonder, rather, whether the design of expression runners can be improved, since even if we increase stack size x10, this doesn't prevent that x10 complex nested expressions still overflow the stack. Some additional details in WebAssembly/binaryen#5648.

@dcodeIO dcodeIO merged commit f7571a4 into main Apr 11, 2023
12 checks passed
@HerrCai0907 HerrCai0907 deleted the update-binaryen branch October 17, 2023 09:00
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 this pull request may close these issues.

None yet

2 participants