Request for reviews (XS): 7101642: JSR 292: SIGSEGV in java.lang.invoke.MethodHandleImpl$FieldAccessor.getFieldI(Ljava/lang/Object; )I

Christian Thalinger christian.thalinger at oracle.com
Mon Oct 24 23:32:22 PDT 2011


http://cr.openjdk.java.net/~twisti/7101642/

7101642: JSR 292: SIGSEGV in java.lang.invoke.MethodHandleImpl$FieldAccessor.getFieldI(Ljava/lang/Object;)I
Reviewed-by:

In some cases JSR 292 code crashes on SPARC when using
TieredCompilation.  But this bug is actually not related to
TieredCompilation.

In SharedRuntime::fixup_callers_callsite there is a bailout on method
handle call sites since we cannot fixup these call sites as the
executed method handle adapters are doing the required MethodHandle
chain work.  fixup_callers_callsite gets passed in a caller_pc which
is then passed on to nmethod::is_method_handle_return.  But
is_method_handle_return takes a return PC.  On the other architectures
these two addresses are the same but on SPARC it's different
(frame::pc_return_offset = 2).

The fix is to adjust caller_pc by frame::pc_return_offset and pass
this value (return_pc) to nmethod::is_method_handle_return.

Tested with failing test case reported in the CR.

src/share/vm/runtime/sharedRuntime.cpp



More information about the hotspot-compiler-dev mailing list