hotspot/src/share/vm/runtime/interfaceSupport.hpp
changeset 40926 2fd1cf3e70e9
parent 40010 e32d5e545789
child 41084 fc5db29fa08e
--- a/hotspot/src/share/vm/runtime/interfaceSupport.hpp	Wed Sep 07 15:21:45 2016 +0200
+++ b/hotspot/src/share/vm/runtime/interfaceSupport.hpp	Wed Sep 07 12:52:20 2016 -0400
@@ -219,6 +219,9 @@
     trans_from_java(_thread_in_vm);
   }
   ~ThreadInVMfromJava()  {
+    if (_thread->stack_yellow_reserved_zone_disabled()) {
+      _thread->enable_stack_yellow_reserved_zone();
+    }
     trans(_thread_in_vm, _thread_in_Java);
     // Check for pending. async. exceptions or suspends.
     if (_thread->has_special_runtime_exit_condition()) _thread->handle_special_runtime_exit_condition();
@@ -306,6 +309,9 @@
     trans_from_java(_thread_in_vm);
   }
   ~ThreadInVMfromJavaNoAsyncException()  {
+    if (_thread->stack_yellow_reserved_zone_disabled()) {
+      _thread->enable_stack_yellow_reserved_zone();
+    }
     trans(_thread_in_vm, _thread_in_Java);
     // NOTE: We do not check for pending. async. exceptions.
     // If we did and moved the pending async exception over into the
@@ -314,6 +320,7 @@
     // to the _thread_in_vm state. Instead we postpone the handling of
     // the async exception.
 
+
     // Check for pending. suspends only.
     if (_thread->has_special_runtime_exit_condition())
       _thread->handle_special_runtime_exit_condition(false);