harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Pervov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-5238) [drlvm][util] memory leak at compile_gen_compile_me at compile_ia32.cpp while EIOffice run
Date Mon, 03 Dec 2007 08:32:43 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-5238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12547763
] 

Pavel Pervov commented on HARMONY-5238:
---------------------------------------

Ilya,

your patch is invalid. The "name" allocated is passed to:
1) compile_add_dynamic_generated_code_chunk where it is stored in DynamicCode list and is
later used in case "GenerateEvents" JVMTI functionality is requested;
2) jvmti_send_dynamic_code_generated_event to be passed to JVMTI agent which also can persist
the string.

So, the correct patch would be to free DynamicCode::name on VM shutdown, where VM_Global_State::loader_env->dcList
is freed.

Thanks for discovering this anyway.

> [drlvm][util] memory leak at compile_gen_compile_me at compile_ia32.cpp while EIOffice
run
> ------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5238
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5238
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: win32,  
>            Reporter: Ilya Leviev
>         Attachments: H-5238.patch
>
>
> svn = r600076
> While profiling a simple EIOffice application on Harmony using
> BoundsChecker the tool detected following memory leaks.
> "name" are not disposed 26214 times while EIOffice startup-shutdown.
> Here is stack trace:    
> malloc	f:\vs70builds\3077\vc\crtbld\crt\src\dbgheap.c	139
> compile_gen_compile_me	vm\vmcore\src\util\ia32\base\compile_ia32.cpp 238
>       name = (char *)STD_MALLOC(sz);
> assign_offsets_to_methods	vm\vmcore\src\class_support\prepare.cpp 	726
> prepare	                                        vm\vmcore\src\class_support\prepare.cpp
 1227
> LoadVerifyAndPrepareClass	vm\vmcore\src\class_support\classloader.cpp 382
> _resolve_class	                           vm\vmcore\src\class_support\resolve.cpp	167
> _resolve_field	                           vm\vmcore\src\class_support\resolve.cpp	418

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message