harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregory Shimansky (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-2264) [drlvm] race condition in ClassLoader::LookupLoader
Date Tue, 06 Feb 2007 13:07:07 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-2264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gregory Shimansky updated HARMONY-2264:
---------------------------------------

    Patch Info: [Patch Available]

> [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
>            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.


Mime
View raw message