http://bugzilla.novell.com/show_bug.cgi?id=574773
http://bugzilla.novell.com/show_bug.cgi?id=574773#c0 Summary: Memory leak in mono_path_resolve_symlinks usage of g_strsplit Classification: Mono Product: Mono: Runtime Version: 2.6.x Platform: Other OS/Version: Mac OS X 10.6 Status: NEW Severity: Major Priority: P5 - None Component: misc AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- I was looking for memory leaks in my code using MallocStackLogging and the leaks command line utility. I found a lot of references like this: Leak: 0xc19e00 size=16 zone: DefaultMallocZone_0xbe7000 string 'Debug' Call stack: [thread 0xa0459500]: | 0x1 | start | main | InitMono | mono_jit_init | mini_init | mono_init_from_assembly | mono_init_internal | get_runtimes_from_exe | mono_image_open | mono_image_open_full | do_mono_image_open | mono_path_resolve_symlinks | g_strsplit | g_strndup | g_malloc | malloc | malloc_zone_malloc Leak: 0xc1a810 size=16 zone: DefaultMallocZone_0xbe7000 string 'Contents' Call stack: [thread 0xa0459500]: | 0x1 | start | main | InitMono | mono_jit_init | mini_init | mono_init_from_assembly | mono_init_internal | get_runtimes_from_exe | mono_image_open | mono_image_open_full | do_mono_image_open | mono_path_resolve_symlinks | g_strsplit | g_strndup | g_malloc | malloc | malloc_zone_malloc In looking at utils/mono-path.c, the code calls g_strsplit() then calls g_free(). According to the documentation on g_strsplit, g_strfreev() should be called. I did a quick grep for g_strsplit there are other usages where no attempt is made to free the returned the array of strings. These leaks may be minor but the add up nonetheless. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
