[vmkit-commits] [vmkit] r82134 - /vmkit/trunk/lib/JnJVM/VMCore/JavaThread.h

Nicolas Geoffray nicolas.geoffray at lip6.fr
Thu Sep 17 01:33:58 PDT 2009


Author: geoffray
Date: Thu Sep 17 03:33:56 2009
New Revision: 82134

URL: http://llvm.org/viewvc/llvm-project?rev=82134&view=rev
Log:
Pop the address of the Java call after calling leaveUncooperativeCode
so that the thread call's stack stays consistent.


Modified:
    vmkit/trunk/lib/JnJVM/VMCore/JavaThread.h

Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaThread.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaThread.h?rev=82134&r1=82133&r2=82134&view=diff

==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaThread.h (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaThread.h Thu Sep 17 03:33:56 2009
@@ -223,10 +223,13 @@
     assert(!(addresses.size() % 2) && "Wrong stack");    
   
     localJNIRefs->removeJNIReferences(this, *currentAddedReferences);
-    addresses.pop_back();
    
     // Go back to cooperative mode.
     leaveUncooperativeCode();
+   
+    // Pop the address after calling leaveUncooperativeCode
+    // to let the thread's call stack coherent.
+    addresses.pop_back();
   }
 
   /// endJava - Record that we are leaving Java code.





More information about the vmkit-commits mailing list