src/hotspot/share/runtime/thread.cpp
changeset 53121 4c4651aba203
parent 53103 67e3a8b3449c
parent 53115 b5c41404f2d1
child 53299 0b2574a2a6c7
--- a/src/hotspot/share/runtime/thread.cpp	Wed Jan 02 07:19:33 2019 -0500
+++ b/src/hotspot/share/runtime/thread.cpp	Wed Jan 02 16:05:13 2019 +0100
@@ -2665,8 +2665,7 @@
 }
 
 void JavaThread::enable_stack_reserved_zone() {
-  assert(_stack_guard_state != stack_guard_unused, "must be using guard pages.");
-  assert(_stack_guard_state != stack_guard_enabled, "already enabled");
+  assert(_stack_guard_state == stack_guard_reserved_disabled, "inconsistent state");
 
   // The base notation is from the stack's point of view, growing downward.
   // We need to adjust it to work correctly with guard_memory()
@@ -2684,11 +2683,10 @@
 }
 
 void JavaThread::disable_stack_reserved_zone() {
-  assert(_stack_guard_state != stack_guard_unused, "must be using guard pages.");
-  assert(_stack_guard_state != stack_guard_reserved_disabled, "already disabled");
+  assert(_stack_guard_state == stack_guard_enabled, "inconsistent state");
 
   // Simply return if called for a thread that does not use guard pages.
-  if (_stack_guard_state == stack_guard_unused) return;
+  if (_stack_guard_state != stack_guard_enabled) return;
 
   // The base notation is from the stack's point of view, growing downward.
   // We need to adjust it to work correctly with guard_memory()