--- old/src/cpu/x86/vm/x86_64.ad 2016-04-11 14:42:26.576499509 +0300 +++ new/src/cpu/x86/vm/x86_64.ad 2016-04-11 14:42:26.403494793 +0300 @@ -2125,7 +2125,11 @@ } if (_method) { // Emit stub for static call. - CompiledStaticCall::emit_to_interp_stub(cbuf); + address stub = CompiledStaticCall::emit_to_interp_stub(cbuf); + if (stub == NULL) { + ciEnv::current()->record_failure("CodeCache is full"); + return; + } } %}