Bugzilla – Attachment 362494 Details for
Bug 605295
Memory leak with DynamicMethod and --debug
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
fix some leaks in the debug code / xdebug code
debug-leak-fix.diff (text/plain), 2.96 KB, created by
Geoff Norton
on 2010-05-15 21:24:27 UTC
(
hide
)
Description:
fix some leaks in the debug code / xdebug code
Filename:
MIME Type:
Creator:
Geoff Norton
Created:
2010-05-15 21:24:27 UTC
Size:
2.96 KB
patch
obsolete
>Index: metadata/mono-debug.c >=================================================================== >--- metadata/mono-debug.c (revision 157384) >+++ metadata/mono-debug.c (working copy) >@@ -291,6 +291,9 @@ > data_table_hash = NULL; > } > >+ if (mono_symbol_table->global_data_table) >+ free_data_table (mono_symbol_table->global_data_table); >+ > g_free (mono_symbol_table); > mono_symbol_table = NULL; > } >Index: mini/xdebug.c >=================================================================== >--- mini/xdebug.c (revision 157384) >+++ mini/xdebug.c (working copy) >@@ -263,6 +263,8 @@ > void > mono_save_xdebug_info (MonoCompile *cfg) > { >+ MonoDebugMethodJitInfo *dmji; >+ > if (use_gdb_interface) { > mono_loader_lock (); > >@@ -278,7 +280,9 @@ > > xdebug_method_count ++; > >- mono_dwarf_writer_emit_method (xdebug_writer, cfg, cfg->jit_info->method, NULL, NULL, cfg->jit_info->code_start, cfg->jit_info->code_size, cfg->args, cfg->locals, cfg->unwind_ops, mono_debug_find_method (cfg->jit_info->method, mono_domain_get ())); >+ dmji = mono_debug_find_method (cfg->jit_info->method, mono_domain_get ());; >+ mono_dwarf_writer_emit_method (xdebug_writer, cfg, cfg->jit_info->method, NULL, NULL, cfg->jit_info->code_start, cfg->jit_info->code_size, cfg->args, cfg->locals, cfg->unwind_ops, dmji); >+ mono_debug_free_method_jit_info (dmji); > > #if 0 > /* >@@ -305,10 +309,13 @@ > return; > > mono_loader_lock (); >- mono_dwarf_writer_emit_method (xdebug_writer, cfg, cfg->jit_info->method, NULL, NULL, cfg->jit_info->code_start, cfg->jit_info->code_size, cfg->args, cfg->locals, cfg->unwind_ops, mono_debug_find_method (cfg->jit_info->method, mono_domain_get ())); >+ dmji = mono_debug_find_method (cfg->jit_info->method, mono_domain_get ());; >+ mono_dwarf_writer_emit_method (xdebug_writer, cfg, cfg->jit_info->method, NULL, NULL, cfg->jit_info->code_start, cfg->jit_info->code_size, cfg->args, cfg->locals, cfg->unwind_ops, dmji); >+ mono_debug_free_method_jit_info (dmji); > fflush (xdebug_fp); > mono_loader_unlock (); > } >+ > } > > /* >Index: mini/dwarfwriter.c >=================================================================== >--- mini/dwarfwriter.c (revision 157384) >+++ mini/dwarfwriter.c (working copy) >@@ -1459,10 +1459,12 @@ > } > > first = FALSE; >+ g_free (loc->source_file); > g_free (loc); > } > } > >+ g_free (native_to_il_offset); > g_free (prev_file_name); > > if (!first) { >@@ -1582,7 +1584,7 @@ > char *name; > MonoMethodSignature *sig; > MonoMethodHeader *header; >- char **names, **tdies, **local_tdies; >+ char **names; > char **local_names; > int *local_indexes; > int i, num_locals; >@@ -1595,7 +1597,6 @@ > header = mono_method_get_header (method); > > /* Parameter types */ >- tdies = g_new0 (char *, sig->param_count + sig->hasthis); > for (i = 0; i < sig->param_count + sig->hasthis; ++i) { > MonoType *t; > >@@ -1612,7 +1613,6 @@ > } > > /* Local types */ >- local_tdies = g_new0 (char *, header->num_locals); > for (i = 0; i < header->num_locals; ++i) { > emit_type (w, header->locals [i]); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 605295
:
361890
| 362494 |
363024
|
363090