JDK-7106774 : JSR 292: nightly test inlineMHTarget fails with wrong result
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs23
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-10-31
  • Updated: 2012-03-22
  • Resolved: 2011-11-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8 Other
7u4Fixed 8Fixed hs23Fixed
Related Reports
Relates :  
Description
The test fails with an error message something like:

# ERROR: Sum computed using MH 1=805306368; Sum computed using MH 2=357472624; using direct calls=805306368
TEST FAILED

Comments
EVALUATION http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/e342a5110bed
22-03-2012

EVALUATION See main CR
30-11-2011

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-emb/hotspot/rev/e342a5110bed
29-11-2011

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/e342a5110bed
15-11-2011

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/e342a5110bed
03-11-2011

EVALUATION The problem is in code which was added with 7090904 that checks if the call site is a method handle invoke. The new code uses Bytecode::code() and compares the result to Bytecodes values: if (cur.code() == Bytecodes::_invokedynamic || (cur.code() == Bytecodes::_invokevirtual && But an invokevirtual can be quickened so that the resulting Bytecode is a different one: (dbx) n t@2 (l@2) stopped in Deoptimization::fetch_unroll_info_helper at line 393 in file "deoptimization.cpp" 393 if (cur.code() == Bytecodes::_invokedynamic || (dbx) p cur.code() cur.code() = _fast_invokevfinal
02-11-2011

SUGGESTED FIX Use Bytecode_invoke::is_invokevirtual() and is_invokedynamic() which use Bytecode::java_code().
02-11-2011

EVALUATION Limiting compilation to mh_iplusk also triggers the bug: $ java -server -Xcomp -XX:CompileCommand=compileonly,vm.mlvm.meth.stress.compiler.inlineMHTarget.Test::mh_iplusk -XX:+PrintCompilation -XX:+PrintInlining vm.mlvm.meth.stress.compiler.inlineMHTarget.Test VM option 'CompileCommand=compileonly,vm.mlvm.meth.stress.compiler.inlineMHTarget.Test::mh_iplusk' VM option '+PrintCompilation' VM option '+PrintInlining' CompilerOracle: compileonly vm/mlvm/meth/stress/compiler/inlineMHTarget/Test.mh_iplusk 678 1 b vm.mlvm.meth.stress.compiler.inlineMHTarget.Test::mh_iplusk (17 bytes) 693 1 size: 180 time: 0 inlined: 14 bytes 694 1 vm.mlvm.meth.stress.compiler.inlineMHTarget.Test::mh_iplusk (17 bytes) made not entrant 713 2 b vm.mlvm.meth.stress.compiler.inlineMHTarget.Test::mh_iplusk (17 bytes) 716 2 size: 932 time: 0 inlined: 2 bytes # ERROR: Sum computed using MH 1=805306368; Sum computed using MH 2=357472624; using direct calls=805306368 TEST FAILED
31-10-2011