diff -r 65a0107d52ed -r c3d0bd36ab28 src/share/vm/opto/compile.cpp --- a/src/share/vm/opto/compile.cpp Mon Mar 14 12:35:48 2016 +0300 +++ b/src/share/vm/opto/compile.cpp Thu Apr 21 16:19:33 2016 +0300 @@ -608,6 +608,10 @@ n->as_MachBranch()->label_set(&fakeL, 0); } n->emit(buf, this->regalloc()); + + // Emitting into the scratch buffer should not fail + assert (!failing(), err_msg_res("Must not have pending failure. Reason is: %s", failure_reason())); + if (is_branch) // Restore label. n->as_MachBranch()->label_set(saveL, save_bnum);