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

copy wrong unpack200.diz to bin directory on linux after 8252395

    XMLWordPrintable

    Details

    • Subcomponent:
    • Introduced In Version:
    • Resolved In Build:
      b01
    • CPU:
      generic
    • OS:
      linux

      Description

      With --with-native-debug-symbols=external|zipped after 8u282, debuginfo of unpack binary is copied into bin directory. However, it copies the wrong file. For the *.debuginfo or *.diz files it takes the unpack excutable as source and copies it to the build image as *.diz or *.debuginfo:

      $ build/linux-x86_64-normal-server-release/images/j2sdk-image/bin/unpack200.debuginfo -h
      Usage: unpack200.debuginfo [-opt... | --option=value]... x.pack[.gz] y.jar

      Unpacking Options
        -H{h}, --deflate-hint={h} override transmitted deflate hint: true, false, or keep (default)
        -r, --remove-pack-file remove input file after unpacking
        -v, --verbose increase program verbosity
        -q, --quiet set verbosity to lowest level
        -l{F}, --log-file={F} output to the given log file, or '-' for standard output (default)
        -?, -h, --help print this message
        -V, --version print program version
        -J{X} Java VM argument (ignored)
      $ build/linux-x86_64-normal-server-release/images/j2sdk-image/bin/java.debuginfo -h
      bash: build/linux-x86_64-normal-server-release/images/j2sdk-image/bin/java.debuginfo: cannot execute binary file: Exec format error

      jdk8u-dev/build/linux-x86_64-normal-server-release/images/j2sdk-image/bin]$ ls -l -rt unpack200*
      -rwxr-xr-x 1 shihui shihui 187202 Mar 5 14:37 unpack200.diz
      -rwxr-xr-x 1 shihui shihui 187202 Mar 5 14:37 unpack200

      jdk8u-dev/build/linux-x86_64-normal-server-release/jdk/bin]$ ls -l -rt unpack200*
      -rwxrwxr-x 1 shihui shihui 805924 Mar 5 14:36 unpack200.diz
      -rwxrwxr-x 1 shihui shihui 805924 Mar 5 14:36 unpack200

      This is not correct debug info and will cause tools/launcher/VersionCheck.java fail with --with-native-debug-symbols=external configure, as it iterate executable in bin directory and invoke -version.

      CompileLaunchers.gmk, set same prerequisite for executable and debuginfo file. install-file function will copy first prerequisite, which is executable.

      $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/unpack200$(EXE_SUFFIX): $(BUILD_UNPACKEXE)
          $(call install-file)

      $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/unpack200$(DEBUGINFO_EXT): $(BUILD_UNPACKEXE)
          $(call install-file)

      # makefile (from `CompileLaunchers.gmk', line 510)
      BUILD_UNPACKEXE := /home/shihui/jdks/openjdk8/jdk8u-dev/build/linux-x86_64-normal-server-release/jdk/objs/unpackexe/unpack200 /home/shihui/jdks/openjdk8/jdk8u-dev/build/linux-x86_64-normal-server-release/jdk/objs/unpackexe/unpack200.diz

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              hshi Hui Shi
              Reporter:
              hshi Hui Shi
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: