Skip to content
Permalink
Browse files

[runtime] Fix some small domain related memory leaks. (#4685)

  • Loading branch information...
vargaz committed Apr 13, 2017
1 parent c2169c0 commit 4cf2b5feee0c3aed6b747105c141f48165bd0ae1
Showing with 4 additions and 1 deletion.
  1. +1 −0 mono/mini/mini-runtime.c
  2. +3 −1 mono/mini/seq-points.c
@@ -3641,6 +3641,7 @@ mini_free_jit_domain_info (MonoDomain *domain)
g_hash_table_foreach (info->llvm_jit_callees, free_jit_callee_list, NULL);
g_hash_table_destroy (info->llvm_jit_callees);
}
mono_internal_hash_table_destroy (&info->interp_code_hash);
#ifdef ENABLE_LLVM
mono_llvm_free_domain_info (domain);
#endif
@@ -237,9 +237,11 @@ mono_save_seq_point_info (MonoCompile *cfg)
// FIXME: dynamic methods
if (!cfg->compile_aot) {
mono_domain_lock (domain);
// FIXME: How can the lookup succeed ?
// FIXME: The lookup can fail if the method is JITted recursively though a type cctor
if (!g_hash_table_lookup (domain_jit_info (domain)->seq_points, cfg->method_to_register))
g_hash_table_insert (domain_jit_info (domain)->seq_points, cfg->method_to_register, cfg->seq_point_info);
else
mono_seq_point_info_free (cfg->seq_point_info);
mono_domain_unlock (domain);
}

0 comments on commit 4cf2b5f

Please sign in to comment.
You can’t perform that action at this time.