Bugzilla – Bug 324401
Leak : virtual generic methods are recompiled at each call
Last modified: 2007-09-15 21:24:46 UTC
---- Reported by jonathan.gagnon@croesus.com 2007-05-24 08:54:57 MST ---- Please fill in this template when reporting a bug, unless you know what you are doing. Description of Problem: Calling the same virtual generic method multiple times causes a leak. It seems like the method is recompiled at each call. I ran valgrind massif on the attached test case and here's the result : Called from: 23.9% : 0x80E5474: mono_class_inflate_generic_method_full (class.c:684) 19.9% : 0x80E8138: mono_mempool_alloc (mempool.c:191) 11.1% : 0x80DE790: mono_method_get_header (loader.c:579) 7.5% : 0x44E4A58: g_mem_chunk_alloc (gmem.c:839) 4.4% : 0x80E51A4: mono_class_inflate_generic_type (class.c:154) 4.4% : 0x80E4E55: inflate_generic_type (class.c:154) 4.4% : 0x80EBB3C: shared_init (handles.c:201) 3.4% : 0x44E3A81: g_realloc (gmem.c:170) 1.8% : 0x44D5CEB: g_hash_table_resize (ghash.c:591) and 129 other insignificant places Steps to reproduce the problem: See the attached test case. Actual Results: Memory usage grows until no memory is left. Expected Results: No leak. How often does this happen? Every time. Additional Information: ---- Additional Comments From jonathan.gagnon@croesus.com 2007-05-24 08:57:21 MST ---- Created an attachment (id=172048) Simple test case ---- Additional Comments From lupus@ximian.com 2007-06-05 11:17:05 MST ---- Using duplicate with inlined test cases. *** This bug has been marked as a duplicate of https://bugzilla.novell.com/show_bug.cgi?id=MONO81806 *** Imported an attachment (id=172048) Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>Windows, Red Hat 9.0, Fedora Core 3</cf_op_sys_details> This bug was marked DUPLICATE in the database it was moved from. Changing resolution to "MOVED"