-
Bug
-
Resolution: Fixed
-
P3
-
hs23
-
b13
-
generic
-
generic
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2220954 | 8 | Christian Thalinger | P3 | Resolved | Fixed | b25 |
JDK-2220854 | 7u4 | Christian Thalinger | P3 | Closed | Fixed | b11 |
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.
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.
- backported by
-
JDK-2220954 JSR 292: MH spread invoker crashes with NULL argument on x86_32
- Resolved
-
JDK-2220854 JSR 292: MH spread invoker crashes with NULL argument on x86_32
- Closed
- relates to
-
JDK-8001109 arity mismatch on a call to spreader method handle should elicit IllegalArgumentException
- Closed