JDK-7141637 : JSR 292: MH spread invoker crashes with NULL argument on x86_32
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs23
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-02-01
  • Updated: 2013-11-26
  • Resolved: 2012-02-21
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 :  

Volker Simonis wrote:


as the test in the webrev demonstrates, the MH spread invoker
will crashes the VM if invoked with a NULL argument on x86_32

This is because nn 32-bit Intel platforms, the spread invoker
uses the 'rsi' register as temporary. But because 'rsi' also
contains the 'saved_last_sp' on x86_32 platforms, 'rsi' has to be
temporary saved on the stack.  If this saving is done before a
failing 'NULL' check in the spread adapter, the following
excpetion handling routine will be confused by the extra value on
the stack, because it expects to find the return address here.

To fix this problem, I've exchanged the usage of the temporary
registers 'rsi' and 'rdi' in the spread adapter such that we only
have to save the value of 'rsi' to the stack after the NULL check
was done:



PS: please don't forget to update the test directory name after a
bug id was assigned to this issue.

EVALUATION http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/392a3f07d567

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/392a3f07d567

EVALUATION See description.