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

Clone data segments when specified with load args #3463

Merged
merged 2 commits into from
May 27, 2024

Conversation

eloparco
Copy link
Contributor

Follow-up on #3389, specifically: #3389 (comment)

If we want to free the wasm binary buffer early, we need to clone the data segments into the module. That's because, in case of passive data segments, they can be referred during wasm execution.

@eloparco eloparco force-pushed the eloparco/clone-data-segments branch from 333792b to bade8a7 Compare May 22, 2024 09:45
core/iwasm/common/wasm_runtime_common.c Outdated Show resolved Hide resolved
samples/basic/src/free_buffer_early.c Outdated Show resolved Hide resolved
core/iwasm/interpreter/wasm_loader.c Show resolved Hide resolved
@eloparco eloparco force-pushed the eloparco/clone-data-segments branch 2 times, most recently from 4cb67c2 to 90bd42a Compare May 23, 2024 11:38
core/iwasm/interpreter/wasm_loader.c Outdated Show resolved Hide resolved
core/iwasm/interpreter/wasm_mini_loader.c Outdated Show resolved Hide resolved
@eloparco eloparco force-pushed the eloparco/clone-data-segments branch from 90bd42a to 4f5c51c Compare May 23, 2024 12:24
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

@wenyongh wenyongh merged commit 3b8ef89 into bytecodealliance:main May 27, 2024
377 checks passed
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.

2 participants