Skip to content

Conversation

xujuntwt95329
Copy link
Collaborator

No description provided.

return NULL;
}

if (module_inst) {
Copy link
Contributor

Choose a reason for hiding this comment

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

module_inst is used to get module in Line 347, wasm_exec_env_get_module doesn't check whether module_inst is NULL or not.
Can we change L347 to wasm_module_t module;, and add checks for module_inst and module at the beginning, L353:

if (!module_inst || !(module = wasm_exec_env_get_module(module_inst))) {
    return NULL;
}

And here and L378, no need to check module_inst again

@wenyongh wenyongh merged commit ee97e30 into bytecodealliance:main Jan 14, 2022
wenyongh referenced this pull request in wenyongh/wasm-micro-runtime Jan 14, 2022
Fix pointer unchecked issue in thread-mgr.c (#960)
vickiegpt pushed a commit to vickiegpt/wamr-aot-gc-checkpoint-restore that referenced this pull request May 27, 2024
And refine the code format of thread_manager.h
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