Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7141637

JSR 292: MH spread invoker crashes with NULL argument on x86_32

XMLWordPrintable

    • b13
    • generic
    • generic
    • Verified

        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.

              twisti Christian Thalinger (Inactive)
              twisti Christian Thalinger (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: