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

wasm_loader allocates more spaces for elements #4099

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

lum1n0us
Copy link
Collaborator

@lum1n0us lum1n0us commented Feb 23, 2025

fix #4096

Copy link
Contributor

@wenyongh wenyongh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with minor issue

goto fail;
}

size = sizeof(WASMArrayNewInitValues)
+ sizeof(WASMValue) * len_val.i32;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

had better change len_val.i32 to (uint64)len_val.i32 to avoid possible integer overflow on 32-bit platform? Since in 32-bit, sizeof(..) is 32 bit.

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.

[gc] array as a field in struct object is not supported in constant init expr
2 participants