[mono/mono] d4741184: [xdebug] Avoid using a MonoDebugMethodJitInfo structure after it has been freed. Fixes #15090.
"Zoltan Varga (
[email protected] )" <
[email protected] >
Sat, 12 Oct 2013 00:50:23 +0000
Newsgroups
gmane.comp.gnome.mono.patches
Message-ID
<00000141aa248c0d-2b16f669-86d2-4f69-aacc-677a5b33ddf6-000000@email.amazonses.com>
Branch: refs/heads/master
Home: https://github.com/mono/mono
Compare: https://github.com/mono/mono/compare/cb19547a83ed...d4741184d320
Commit: d4741184d320ecd17c674b587c263d1eafb5a0cb
Author: Zoltan Varga <[email protected] > (vargaz)
Date: 2013-10-12 00:49:10 GMT
URL: https://github.com/mono/mono/commit/d4741184d320ecd17c674b587c263d1eafb5a0cb
[xdebug] Avoid using a MonoDebugMethodJitInfo structure after it has been freed. Fixes #15090.
Changed paths:
M mono/mini/dwarfwriter.c
Modified: mono/mini/dwarfwriter.c
===================================================================
@@ -35,7 +35,6 @@
char *start_symbol, *end_symbol;
guint8 *code;
guint32 code_size;
- MonoDebugMethodJitInfo *debug_info;
} MethodLineNumberInfo;
struct _MonoDwarfWriter
@@ -888,8 +887,11 @@ struct _MonoDwarfWriter
/* Emit line number table */
for (l = info_list; l; l = l->next) {
MethodLineNumberInfo *info = l->data;
+ MonoDebugMethodJitInfo *dmji;
- emit_line_number_info (w, info->method, info->start_symbol, info->end_symbol, info->code, info->code_size, info->debug_info);
+ dmji = mono_debug_find_method (info->method, mono_domain_get ());;
+ emit_line_number_info (w, info->method, info->start_symbol, info->end_symbol, info->code, info->code_size, dmji);
+ mono_debug_free_method_jit_info (dmji);
}
g_slist_free (info_list);
@@ -2083,7 +2085,6 @@ struct _MonoDwarfWriter
info->end_symbol = g_strdup (end_symbol);
info->code = code;
info->code_size = code_size;
- info->debug_info = debug_info;
w->line_info = g_slist_prepend (w->line_info, info);
} else {
emit_line_number_info (w, method, start_symbol, end_symbol, code, code_size, debug_info);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches