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

Desire x86 ud2 instruction to indicate end of code block

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P3
    • Resolution: Not an Issue
    • Affects Version/s: 9
    • Fix Version/s: 10
    • Component/s: hotspot

      Description

      The Oracle Studio Performance Analyzer walks x86 instructions while a target
      application is running as part of call-stack unwind in order to attribute
      performance metrics to user source code. Starting with Java 9, there have
      been problematic instruction byte sequences that have caused SEGVs. They
      look like:
          jmp *(%reg)
          nop
      where the nop can take many different forms and apparently serves to pad out
      until the next multiple-of-8 boundary. It is desirable that the end of a
      code block, when there will be no more executable instructions, would be
      indicated with an x86 ud2 (0x0f 0x0b) before the nop so that there is a clear
      indicator that no further bytes should be walked. Please let me know if
      there is anything about this request that needs further explanation.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              shadowbug Shadow Bug
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: