From 28446b92a98918b305604ee36b14ec61953b64af Mon Sep 17 00:00:00 2001 From: coleenp Date: Thu, 20 Aug 2015 11:18:51 -0400 Subject: [PATCH] 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 -- GitLab