From e64b6e8120eb8d29a566cd7b6e809c3cbed19bbb Mon Sep 17 00:00:00 2001 From: zhouliang3 Date: Tue, 23 Nov 2021 10:57:01 +0800 Subject: [PATCH] Fix bug of destroy_callback_list not cleared when thread mgr destroy (#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 --- core/iwasm/libraries/thread-mgr/thread_manager.c | 1 + 1 file changed, 1 insertion(+) diff --git a/core/iwasm/libraries/thread-mgr/thread_manager.c b/core/iwasm/libraries/thread-mgr/thread_manager.c index 2c1f3e6c..87a24bef 100644 --- a/core/iwasm/libraries/thread-mgr/thread_manager.c +++ b/core/iwasm/libraries/thread-mgr/thread_manager.c @@ -240,6 +240,7 @@ void wasm_cluster_cancel_all_callbacks() { traverse_list(destroy_callback_list, free_node_visitor, NULL); + bh_list_init(destroy_callback_list); } WASMCluster *