harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r594178 - /harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_java_basic.cpp
Date Mon, 12 Nov 2007 15:20:34 GMT
Author: gshimansky
Date: Mon Nov 12 07:20:33 2007
New Revision: 594178

URL: http://svn.apache.org/viewvc?rev=594178&view=rev
Log:
Applied patch from HARMONY-5103
[drlvm] Crash in DeleteGlobalRef


Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_java_basic.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_java_basic.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_java_basic.cpp?rev=594178&r1=594177&r2=594178&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_java_basic.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_java_basic.cpp Mon Nov 12 07:20:33
2007
@@ -404,7 +404,6 @@
 
     // Detach from VM.
     jobject java_thread = vm_thread->java_thread;
-    JNIEnv *jni_env = vm_thread->jni_env;
     jint status = vm_detach(java_thread);
     if (status != JNI_OK) {
         return TM_ERROR_INTERNAL;
@@ -417,7 +416,8 @@
     //}
 
     // Delete global reference to current thread object.
-    jni_env->DeleteGlobalRef(java_thread);
+    // jni_env is already deallocated in vm_detach.
+    DeleteGlobalRef(/*jni_env*/NULL, java_thread);
 
     // Decrease alive thread counter
     jthread_end_count();



Mime
View raw message