harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r504541 - in /harmony/enhanced/drlvm/trunk/vm/vmcore: include/jni_utils.h src/class_support/classloader.cpp src/jni/jni_utils.cpp
Date Wed, 07 Feb 2007 13:29:09 GMT
Author: varlax
Date: Wed Feb  7 05:29:08 2007
New Revision: 504541

URL: http://svn.apache.org/viewvc?view=rev&rev=504541
Log:
Applied HARMONY-2264 [drlvm] race condition in ClassLoader::LookupLoader

Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/jni_utils.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni_utils.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/include/jni_utils.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/include/jni_utils.h?view=diff&rev=504541&r1=504540&r2=504541
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/include/jni_utils.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/include/jni_utils.h Wed Feb  7 05:29:08 2007
@@ -37,7 +37,6 @@
 VMEXPORT jobject jni_class_loader_from_handle(JNIEnv*, ClassLoaderHandle);
 VMEXPORT ClassLoaderHandle class_loader_lookup(jobject loader);
 VMEXPORT void class_loader_load_native_lib(const char* lib, ClassLoaderHandle loader);
-VMEXPORT ClassLoaderHandle class_loader_find_if_exists(jobject loader);
 
 VMEXPORT jvalue *get_jvalue_arg_array(Method *method, va_list args);
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp?view=diff&rev=504541&r1=504540&r2=504541
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp Wed Feb  7 05:29:08
2007
@@ -415,7 +415,7 @@
 
 ClassLoader* ClassLoader::FindByObject(ManagedObject* loader)
 {
-    LMAutoUnlock aulock( &(ClassLoader::m_tableLock) );
+    LMAutoUnlock aulock(&(ClassLoader::m_tableLock));
     ClassLoader* cl;
     for(unsigned i = 0; i < m_nextEntry; i++)
     {
@@ -428,6 +428,7 @@
 
 ClassLoader* ClassLoader::LookupLoader( ManagedObject* loader )
 {
+    LMAutoUnlock aulock(&(ClassLoader::m_tableLock));
     if( !loader ) return NULL;
     ClassLoader *cl = FindByObject( loader );
     if( cl )
@@ -568,7 +569,6 @@
 {
     SuspendDisabledChecker sdc;
 
-    LMAutoUnlock aulock( &(ClassLoader::m_tableLock) );
     ClassLoader* cl = new UserDefinedClassLoader();
     TRACE2("classloader.unloading.add", "Adding class loader "
         << cl << " (" << loader << " : "

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni_utils.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni_utils.cpp?view=diff&rev=504541&r1=504540&r2=504541
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni_utils.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jni/jni_utils.cpp Wed Feb  7 05:29:08 2007
@@ -90,17 +90,6 @@
 }
 
 
-ClassLoaderHandle class_loader_find_if_exists(jobject loader)
-{
-    ObjectHandle h = (ObjectHandle)loader;
-
-    hythread_suspend_disable();       //---------------------------------v
-    ClassLoader* cl = ClassLoader::FindByObject(h->object);
-    hythread_suspend_enable();        //---------------------------------^
-
-    return cl;
-} //class_loader_find_if_exists
-
 VMEXPORT
 jvalue *get_jvalue_arg_array(Method *method, va_list args)
 {



Mime
View raw message