Skip to content

Allow (custom) sections to be more than 4GB in size? #1317

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

Open
dschuff opened this issue Dec 18, 2019 · 1 comment
Open

Allow (custom) sections to be more than 4GB in size? #1317

dschuff opened this issue Dec 18, 2019 · 1 comment

Comments

@dschuff
Copy link
Member

dschuff commented Dec 18, 2019

The spec for the module format limits the section size to be a u32, meaning sections can't be more than 4GB in size. But it's entirely possible for (for example) debug info to be larger than that.
For the LLVM ecosystem we will likely come up with a scheme that stores debug info separately from the loaded wasm binary, but it might be reasonable to use wasm-format containers to store this information (as we do for object files).

Should we allow sections (or maybe just custom sections) to be larger than expressible in u32? It would be a backwards-compatible change since use LEB everywhere; we'd just have to raise the limit in the tools. (Browsers might not want to allow such large sections anyway; we could put a limitation there alongside the other embedder-specific limits).

@binji
Copy link
Member

binji commented Jan 14, 2020

Sgtm, next steps would be bringing to CG.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants