Skip to content

Conversation

@DS-LK
Copy link
Contributor

@DS-LK DS-LK commented Nov 22, 2021

The destroy_callback_list variable in thread_manager_destroy is not cleared. When wamr is started as a task, after exiting and restarting, it will loop endlessly in traverse_list

wasm_cluster_cancel_all_callbacks()
{
traverse_list(destroy_callback_list, free_node_visitor, NULL);
memset(destroy_callback_list, 0, sizeof(*destroy_callback_list));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Had better use bh_list_init API as we can't assume the list implementation from this file

Suggested change
memset(destroy_callback_list, 0, sizeof(*destroy_callback_list));
bh_list_init(destroy_callback_list);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, thank you.

@wenyongh wenyongh merged commit e64b6e8 into bytecodealliance:main Nov 23, 2021
vickiegpt pushed a commit to vickiegpt/wamr-aot-gc-checkpoint-restore that referenced this pull request May 27, 2024
…ytecodealliance#844)

The destroy_callback_list variable in thread_manager_destroy is not cleared.
When wamr is started as a task, after exiting and restarting, it will loop
endlessly in traverse_list.

Signed-off-by: zhouliang3 <[email protected]>
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.

3 participants