# HG changeset patch # User Andreas Woess # Date 1487105941 -3600 # Node ID 01e71b55ff026d092aa605bf382c8f1dee2efa0d # Parent b48ccfe5310157a047e65382863242dad4d44c64 8172751: OSR compilation at unreachable bci causes C1 crash diff -r b48ccfe53101 -r 01e71b55ff02 src/share/vm/c1/c1_GraphBuilder.cpp --- a/src/share/vm/c1/c1_GraphBuilder.cpp Tue Feb 14 21:13:43 2017 +0100 +++ b/src/share/vm/c1/c1_GraphBuilder.cpp Tue Feb 14 21:59:01 2017 +0100 @@ -3285,7 +3285,9 @@ // for osr compile, bailout if some requirements are not fulfilled if (osr_bci != -1) { BlockBegin* osr_block = blm.bci2block()->at(osr_bci); - assert(osr_block->is_set(BlockBegin::was_visited_flag),"osr entry must have been visited for osr compile"); + if (!osr_block->is_set(BlockBegin::was_visited_flag)) { + BAILOUT("osr entry must have been visited for osr compile"); + } // check if osr entry point has empty stack - we cannot handle non-empty stacks at osr entry points if (!osr_block->state()->stack_is_empty()) {