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

Maintain sufficient allocated space in the vector #103

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lum1n0us
Copy link
Collaborator

@lum1n0us lum1n0us commented Jan 23, 2025

wasm_runtime_call_wasm() is called with argv
used to pass parameters, and the callee reuses
argv to store the results. Therefore, argv
must be long enough to hold the results.

Typically, a vector's length changes with
operations, but in our scenario, append()
operation occurs outside of our control. If there
are more results than parameters, the vector will
end up with an incorrect length unless we
proactively manage it.

Update Dockerfile and devcontainer configuration

fix #97

@lum1n0us lum1n0us requested a review from wenyongh as a code owner January 23, 2025 07:16
`wasm_runtime_call_wasm()`` is called with `argv`
used to pass parameters, and the callee reuses
`argv` to store the results. Therefore, `argv`
must be long enough to hold the results.

Typically, a vector's length changes with
operations, but in our scenario, `append()`
operation occurs outside of our control. If there
are more results than parameters, the vector will
end up with an incorrect length unless we
proactively manage it.

Update Dockerfile and devcontainer configuration
@lum1n0us lum1n0us marked this pull request as draft January 23, 2025 07:19
@lum1n0us lum1n0us marked this pull request as ready for review January 23, 2025 07:27
@Sieluna
Copy link

Sieluna commented Jan 25, 2025

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.

Question: Segmentation fault (Zero Byte Expected)
2 participants