changeset 9067:4a7da2a46cb1

8133951: Zero interpreter asserts in stubRoutines.cpp Summary: Allow zero sized code buffer when checking if there's enough remaining size Reviewed-by: kvn
author coleenp
date Thu, 20 Aug 2015 11:18:51 -0400
parents dc471edac21e
children 9b865b281711
files src/share/vm/runtime/stubRoutines.cpp
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/runtime/stubRoutines.cpp	Thu Oct 31 19:36:58 2019 +0100
+++ b/src/share/vm/runtime/stubRoutines.cpp	Thu Aug 20 11:18:51 2015 -0400
@@ -176,7 +176,7 @@
     StubGenerator_generate(&buffer, false);
     // When new stubs added we need to make sure there is some space left
     // to catch situation when we should increase size again.
-    assert(buffer.insts_remaining() > 200, "increase code_size1");
+    assert(code_size1 == 0 || buffer.insts_remaining() > 200, "increase code_size1");
   }
 }
 
@@ -231,7 +231,7 @@
     StubGenerator_generate(&buffer, true);
     // When new stubs added we need to make sure there is some space left
     // to catch situation when we should increase size again.
-    assert(buffer.insts_remaining() > 200, "increase code_size2");
+    assert(code_size2 == 0 || buffer.insts_remaining() > 200, "increase code_size2");
   }
 
 #ifdef ASSERT