JDK-6928839 : JSR 292 typo in x86 _adapter_check_cast
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs17
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2010-02-23
  • Updated: 2010-09-24
  • Resolved: 2010-03-10
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 6 JDK 7 Other
6u21Fixed 7Fixed hs17Fixed
There is a small typo in methodHandles_x86.cpp in MethodHandles::generate_method_handle_stub for _adapter_check_cast: the object null test is only a testl but should be a testptr.  The fix is obvious.

EVALUATION ChangeSet=http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/855c5171834c,ChangeRequest=6928839

SUGGESTED FIX diff --git a/src/cpu/x86/vm/methodHandles_x86.cpp b/src/cpu/x86/vm/methodHandles_x86.cpp --- a/src/cpu/x86/vm/methodHandles_x86.cpp +++ b/src/cpu/x86/vm/methodHandles_x86.cpp @@ -584,7 +584,7 @@ void MethodHandles::generate_method_hand Label done; __ movptr(rdx_temp, vmarg); - __ testl(rdx_temp, rdx_temp); + __ testptr(rdx_temp, rdx_temp); __ jccb(Assembler::zero, done); // no cast if null __ load_klass(rdx_temp, rdx_temp);