-
Notifications
You must be signed in to change notification settings - Fork 438
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
A M3Module maybe freed twice. #389
Comments
YoungWenMing
added a commit
to YoungWenMing/wasm3
that referenced
this issue
Sep 30, 2022
A module maybe freed after it is loaded to the runtime and before the runtime is released. Hence, it is necessary to remove the module from the runtime's module list to avoid one module be freed twice. Fix wasm3#389
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After a module is loaded to the runtime, we may get an error when handling module links. The loaded module has to be freed in such case, and thus another error may occur when the whole runtime is being freed: the module is freed before may be freed for the second time.
For example, somethings wrong happened after this statement in
platforms/app/main.c
:and then
m3_FreeModule
is called.However, at the end of the whole process, we do this:
The formerly freed module will be freed twice and thus make a segment fault occur.
The text was updated successfully, but these errors were encountered: