United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7141637 JSR 292: MH spread invoker crashes with NULL argument on x86_32
JDK-7141637 : JSR 292: MH spread invoker crashes with NULL argument on x86_32

Details
Type:
Bug
Submit Date:
2012-02-01
Status:
Closed
Updated Date:
2013-11-26
Project Name:
JDK
Resolved Date:
2012-02-21
Component:
hotspot
OS:
generic
Sub-Component:
compiler
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs23
Fixed Versions:
hs23 (b13)

Related Reports
Backport:
Backport:
Relates:

Sub Tasks

Description
http://mail.openjdk.java.net/pipermail/hotspot-dev/2012-January/005152.html

Volker Simonis wrote:

Hi,

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

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:

http://cr.openjdk.java.net/~simonis/SpreadNullArg/

Regards,
Volker

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

                                    

Comments
EVALUATION

See description.
                                     
2012-02-01
EVALUATION

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

http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/392a3f07d567
                                     
2012-03-22



Hardware and Software, Engineered to Work Together