--- old/src/share/vm/opto/compile.cpp 2016-04-11 14:42:29.266572830 +0300 +++ new/src/share/vm/opto/compile.cpp 2016-04-11 14:42:29.020566125 +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);