Code Review for 7101642

Prepared by:twisti on Mon Oct 24 07:17:47 PDT 2011
Workspace:/home/twisti/hsx/hotspot-comp/7101642
Compare against: /home/twisti/hsx/hotspot-comp/hotspot
Summary of changes: 9 lines changed: 3 ins; 1 del; 5 mod; 2936 unchg
Patch of changes: 7101642.patch
Printable review: 7101642.pdf
Author comments:
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.

Bug id: 7101642 JSR 292: SIGSEGV in java.lang.invoke.MethodHandleImpl$FieldAccessor.getFieldI(Ljava/lang/Object;)I
Legend: Modified file
Deleted file
New file

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw src/share/vm/runtime/sharedRuntime.cpp

9 lines changed: 3 ins; 1 del; 5 mod; 2936 unchg

This code review page was prepared using /home/twisti/bin/webrev (vers 23.18-hg-never).