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

galoisCounterMode_AESCrypt stack walking broken

    XMLWordPrintable

Details

    • b25

    Description

      The (x64) Java stack walking code uses RBP as a stack pointer; the register points to the location of previous RBP, and the next slot on stack is supposed to contain the return address at all times.

      The stub mentioned in the summary changes RBP in the middle of the method [1]. This breaks stack walking, resulting in odd flamegraphs generated by asyncprofiler.

      Sample flamegraphs (current and fixed) attached. They were produced with:
      make test TEST=micro:full.CipherBench.GCM.enc MICRO_OPTIONS='-prof async:libPath=/path/to/libasyncProfiler.so\\\;output=flamegraph'

      [1] https://github.com/openjdk/jdk/blob/17409500369bd8503782b2e6f4e885e33837087a/src/hotspot/cpu/x86/stubGenerator_x86_64_aes.cpp#L264-L265

      Attachments

        Issue Links

          Activity

            People

              djelinski Daniel Jelinski
              djelinski Daniel Jelinski
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: