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

Are there any limits on nested blocks/loops in binaryen ? #6830

Open
hgruniaux opened this issue Aug 10, 2024 · 2 comments
Open

Are there any limits on nested blocks/loops in binaryen ? #6830

hgruniaux opened this issue Aug 10, 2024 · 2 comments

Comments

@hgruniaux
Copy link

The question is in the title.

I searched in the code, and I found nothing. I am curious to know if there are any limits in the parser or the static analyzer for the depth of nested blocks or loops.

Also, do you know if such limits exist in current engines?

Thanks in advance.

@kripken
Copy link
Member

kripken commented Aug 12, 2024

I don't believe there is a specific limit for such nesting. Here is the V8 file with such limits:

https://github.com/v8/v8/blob/main/src/wasm/wasm-limits.h

I don't recall this being an issue in the past, either in V8 or Binaryen or elsewhere. It is common to have many thousands of nested blocks in practice for various switch constructs, for example.

@hgruniaux
Copy link
Author

Thanks for your answer!

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