From 0cf12005e5886c832f7528be46ff027e8755ee7b Mon Sep 17 00:00:00 2001 From: coleenp Date: Thu, 20 Aug 2015 11:18:51 -0400 Subject: 8133951: Zero interpreter asserts in stubRoutines.cpp Summary: Allow zero sized code buffer when checking if there's enough remaining size Reviewed-by: kvn --- src/share/vm/runtime/stubRoutines.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/share/vm/runtime/stubRoutines.cpp b/src/share/vm/runtime/stubRoutines.cpp index 6b8f7e754..b2b3a90d9 100644 --- a/src/share/vm/runtime/stubRoutines.cpp +++ b/src/share/vm/runtime/stubRoutines.cpp @@ -176,7 +176,7 @@ void StubRoutines::initialize1() { 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 @@ void StubRoutines::initialize2() { 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 -- cgit v1.2.3