You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexey Varlamov (JIRA)" <ji...@apache.org> on 2007/02/07 14:31:06 UTC
[jira] Resolved: (HARMONY-2264) [drlvm] race condition in
ClassLoader::LookupLoader
[ https://issues.apache.org/jira/browse/HARMONY-2264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey Varlamov resolved HARMONY-2264.
--------------------------------------
Resolution: Fixed
Applied the fix at r504541
> [drlvm] race condition in ClassLoader::LookupLoader
> ---------------------------------------------------
>
> Key: HARMONY-2264
> URL: https://issues.apache.org/jira/browse/HARMONY-2264
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Alexey Varlamov
> Assigned To: Alexey Varlamov
> Priority: Minor
> Attachments: H2264.patch
>
>
> The ClassLoader::LookupLoader() can potentially create duplicate native structures for the same Java classloader instance.
> ClassLoader* ClassLoader::LookupLoader( ManagedObject* loader )
> {
> if( !loader ) return NULL;
> ClassLoader *cl = FindByObject( loader );
> if( cl )
> return cl;
> else
> return AddClassLoader( loader );
> }
> It is possible that concurrent threads request this method simultaneously and AddClassLoader can be called several times for the same loader instance.
> BTW, It seems more logical and clean to declare this method (and a bunch of other static methods re Java-native loaders mapping) in UserDefinedClassLoader class, rather than in common ClassLoader.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.