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

Wrong initialization of nmethod::_consts_offset for native nmethods

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 20
    • 11, 17, 20
    • hotspot
    • b18

    Description

      Symptom 1: Negative sizes of constants sections for native nmethods

      Reproduce:

      * Build with attached patch
      * Run `java -Xcomp -Xlog:jit+compilation=debug -version`

      The output will contain "NEGATIVE constants section size" for every native nmethod.

      Symptom 2: Empty constants section in PrintAssembly output for (Loom) continuation
      enter intrinsic even though, at least on PPC, it is not empty.

      Analysis: JDK-6961697 [1] moved the constants section before the instruction section. This was
      reflected in the initialization of nmethod::_consts_offset done by the nmethod
      constructor for c1/c2 compiled nmethods. It was forgotten though to update the
      constructor for native nmethods.

      [1] Commit for JDK-6961697
          https://github.com/openjdk/jdk/commit/6a0c40f1fee892687ab615dd2566109e8204ec96

      Attachments

        Issue Links

          Activity

            People

              rrich Richard Reingruber
              rrich Richard Reingruber
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: