-
Bug
-
Resolution: Fixed
-
P4
-
openjdk8u282
-
b01
-
generic
-
linux
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
$ 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
- relates to
-
JDK-8252395 [8u] --with-native-debug-symbols=external doesn't include debuginfo files for binaries
- Resolved