@@ -1258,37 +1258,55 @@ wasm_runtime_destroy_registered_module_list()
12581258{
12591259 WASMRegisteredModule * reg_module = NULL ;
12601260
1261+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
12611262 os_mutex_lock (& registered_module_list_lock );
1263+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
12621264 reg_module = bh_list_first_elem (registered_module_list );
1265+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
12631266 while (reg_module ) {
1267+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
12641268 WASMRegisteredModule * next_reg_module = bh_list_elem_next (reg_module );
1269+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
12651270
12661271 bh_list_remove (registered_module_list , reg_module );
1272+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
12671273
12681274 /* now, it is time to release every module in the runtime */
12691275 if (reg_module -> module -> module_type == Wasm_Module_Bytecode ) {
1276+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
12701277#if WASM_ENABLE_INTERP != 0
12711278 wasm_unload ((WASMModule * )reg_module -> module );
12721279#endif
1280+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
12731281 }
12741282 else {
1283+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
12751284#if WASM_ENABLE_AOT != 0
12761285 aot_unload ((AOTModule * )reg_module -> module );
12771286#endif
1287+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
12781288 }
1289+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
12791290
12801291 /* destroy the file buffer */
12811292 if (destroyer && reg_module -> orig_file_buf ) {
1293+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
12821294 destroyer (reg_module -> orig_file_buf ,
12831295 reg_module -> orig_file_buf_size );
1296+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
12841297 reg_module -> orig_file_buf = NULL ;
12851298 reg_module -> orig_file_buf_size = 0 ;
12861299 }
1300+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
12871301
12881302 wasm_runtime_free (reg_module );
1303+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
12891304 reg_module = next_reg_module ;
1305+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
12901306 }
1307+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
12911308 os_mutex_unlock (& registered_module_list_lock );
1309+ LOG_DEBUG ("%s %d" , __func__ , __LINE__ );
12921310}
12931311
12941312bool
0 commit comments