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

jmod hash is creating unlinkable modules.

XMLWordPrintable

    • b153
    • generic
    • generic
    • Verified

      Here's what I/we found when running "jmod hash".

      As background:

          jdk.jdeps requires jdk.compiler
          jdk.compiler requires java.compiler

      Running this:

      % cd build/windows*/images/jmods
      % jmod.exe hash --mp . --hash-modules \
          "jdk.jdeps|jdk.compiler|java.compiler"

      updates two files:

      jdk.compiler.jmod
          adds "hash jdk.jdeps"
          updates timestamp (zip file offset 10-14)

      java.compiler.jmod
          adds "hash jdk.[compiler,jdeps]"
          updates timestamp (zip file offset 10-14)

      But note that when the hash for jdk.compiler.jmod was calculated to add to java.compiler.jmod, it used the original file/internal timestamp, not the updated/soon-to-be-written one. So if you now try to run jlink, the stored java.compiler signature for jdk.compiler.jmod won't match.

      So my question is:

      Mandy wrote:
      > But I would expect only java.compiler will record the hashes.

      Was jdk.compiler.jmod also supposed to be updated in the "jmod hash" above?

      If no, you have a bug because it is being updated.
      If yes, you have a bug in that you're calculating jdk.compiler pre-update.

      I'm just not sure which one is the expected behavior.

            mchung Mandy Chung (Inactive)
            wetmore Bradford Wetmore
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: