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

Running 'Start' function corrupts wasm-stack in m3_Call*-functions #363

Closed
skrphv opened this issue Aug 10, 2022 · 2 comments
Closed

Running 'Start' function corrupts wasm-stack in m3_Call*-functions #363

skrphv opened this issue Aug 10, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@skrphv
Copy link
Contributor

skrphv commented Aug 10, 2022

If we call m3_Call / m3_CallVL / m3_CallArgv and Start-function not executed,
then checkStartFunction is executing (here: https://github.com/wasm3/wasm3/blob/main/source/m3_env.c#L907),
but arguments for called function is written to the stack above (here: https://github.com/wasm3/wasm3/blob/main/source/m3_env.c#L892)
and after executing checkStartFunction the stack no longer contains arguments for called functions.

@skrphv skrphv changed the title Checking 'Start' function corrupts wasm-stack Running 'Start' function corrupts wasm-stack Aug 10, 2022
@skrphv skrphv changed the title Running 'Start' function corrupts wasm-stack Running 'Start' function corrupts wasm-stack in m3_Call*-functions Aug 10, 2022
skrphv added a commit to skrphv/wasm3 that referenced this issue Aug 10, 2022
@skrphv
Copy link
Contributor Author

skrphv commented Aug 10, 2022

issues#363

@skrphv skrphv closed this as completed Aug 10, 2022
@skrphv skrphv reopened this Aug 10, 2022
matovitch pushed a commit to matovitch/wasm3 that referenced this issue Aug 21, 2022
@vshymanskyy vshymanskyy added the bug Something isn't working label Aug 27, 2022
vshymanskyy pushed a commit that referenced this issue Aug 31, 2022
* fix for [issues#363](#363)

* minor
@vshymanskyy
Copy link
Member

Merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants