[Mono-dev] [PATCH] Memory leak in debug support code
Rodrigo Kumpera
kumpera at gmail.com
Mon Jun 9 16:16:45 EDT 2008
Hi Martin,
The attached patch fixes two memory leaks related to how
mono-debug.c::find_method works.
The patch moves mono_debug_free_method_jit_info from mini/debug-mini.c to
metadata/mono-debug.c and
add it to the public API.
The first memleak happens from ves_icall_System_Exception_get_trace which
leaks memory every time
source/line info is extracted from debug info. The second happens
debug-mini.c::mono_debug_print_vars when it
call mono_debug_find_method.
The issue is that find_method returns a new malloc'ed struct and no code
took care of free'ing that.
Please review. I think this fix is very important to get into 2.0 as, for
example, we leak 125k on 2.0 System test suite just
due to the get_trace leaks.
Thanks,
Rodrigo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20080609/69cae76e/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debug_leak.diff
Type: text/x-patch
Size: 2110 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20080609/69cae76e/attachment.bin
More information about the Mono-devel-list
mailing list