8046226: assert(_thread == Thread::current()) failed: thread must be current w/ -XX:+TraceDeoptimization -XX:+Verbose
authorvlivanov
Mon, 09 Jun 2014 11:49:02 +0000
changeset 24938 83d8425d85a3
parent 24937 5da2952ec874
child 24939 6c994cc056ef
8046226: assert(_thread == Thread::current()) failed: thread must be current w/ -XX:+TraceDeoptimization -XX:+Verbose Reviewed-by: twisti, dcubed, fparain
hotspot/src/share/vm/runtime/vframe.cpp
--- a/hotspot/src/share/vm/runtime/vframe.cpp	Fri Jun 06 13:31:55 2014 -0700
+++ b/hotspot/src/share/vm/runtime/vframe.cpp	Mon Jun 09 11:49:02 2014 +0000
@@ -274,7 +274,8 @@
   // Get oopmap describing oops and int for current bci
   InterpreterOopMap oop_mask;
   if (TraceDeoptimization && Verbose) {
-    methodHandle m_h(thread(), method());
+    // need the current JavaThread and not thread()
+    methodHandle m_h(Thread::current(), method());
     OopMapCache::compute_one_oop_map(m_h, bci(), &oop_mask);
   } else {
     method()->mask_for(bci(), &oop_mask);
@@ -335,7 +336,8 @@
   if (!method()->is_native()) {
     // Get oopmap describing oops and int for current bci
     if (TraceDeoptimization && Verbose) {
-      methodHandle m_h(method());
+      // need the current JavaThread and not thread()
+      methodHandle m_h(Thread::current(), method());
       OopMapCache::compute_one_oop_map(m_h, bci(), &oop_mask);
     } else {
       method()->mask_for(bci(), &oop_mask);