Mercurial > hg > graal-jvmci-8
diff src/share/vm/oops/methodOop.cpp @ 3404:2d4b2b833d29
7033141: assert(has_cp_cache(i)) failed: oob
Summary: Unrewrite bytecodes for OOM error allocating the constant pool cache.
Reviewed-by: dcubed, acorn, never
author | coleenp |
---|---|
date | Fri, 27 May 2011 15:04:48 -0700 |
parents | 328926869b15 |
children | deaa3ce90583 |
line wrap: on
line diff
--- a/src/share/vm/oops/methodOop.cpp Wed May 25 16:04:09 2011 -0700 +++ b/src/share/vm/oops/methodOop.cpp Fri May 27 15:04:48 2011 -0700 @@ -693,7 +693,10 @@ // Called when the method_holder is getting linked. Setup entrypoints so the method // is ready to be called from interpreter, compiler, and vtables. void methodOopDesc::link_method(methodHandle h_method, TRAPS) { - assert(_i2i_entry == NULL, "should only be called once"); + // If the code cache is full, we may reenter this function for the + // leftover methods that weren't linked. + if (_i2i_entry != NULL) return; + assert(_adapter == NULL, "init'd to NULL" ); assert( _code == NULL, "nothing compiled yet" ); @@ -717,7 +720,7 @@ // called from the vtable. We need adapters on such methods that get loaded // later. Ditto for mega-morphic itable calls. If this proves to be a // problem we'll make these lazily later. - (void) make_adapters(h_method, CHECK); + if (UseCompiler) (void) make_adapters(h_method, CHECK); // ONLY USE the h_method now as make_adapter may have blocked