Closed
Description
Description
This is similar to #266, but for JDK 17. The root cause must be different as the boot JDK has the fix for MetaUtil.java
which we did for JDK 11 is present in OpenJDK 17. See:
https://github.com/openjdk/jdk17u/blob/6f0f42630eac1febf562062afc523fdf3d2a920a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MetaUtil.java#L95
For the reproducer I see this:
$ strings ./debug-symbols-smoke-mandrel-21.3-jdk17 | grep com.oracle.svm.core.VM.Java.Version
com.oracle.svm.core.VM.Java.Version=17.0.2
$ strings ./debug-symbols-smoke-mandrel-21.3-jdk17 | grep com.oracle.svm.core.VM=
com.oracle.svm.core.VM=GraalVM 21.3.2-dev Java 17 Mandrel Distribution
$ gdb -ex 'info functions .*smoke.*' ./debug-symbols-smoke-mandrel-21.3-jdk17
GNU gdb (GDB) Fedora 11.1-5.fc35
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./debug-symbols-smoke-mandrel-21.3-jdk17...
All functions matching regular expression ".*smoke.*":
File debug_symbols_smoke/ClassA.java:
java.lang.String *debug_symbols_smoke.ClassA::toString(void);
File debug_symbols_smoke/Main$$Lambda$605/0x00000007c0541b70.java:
void debug_symbols_smoke.Main$$Lambda$605.0x00000007c0541b70::accept(java.lang.Object *);
File debug_symbols_smoke/Main.java:
void debug_symbols_smoke.Main::lambda$thisIsTheEnd$0(java.io.ByteArrayOutputStream *, debug_symbols_smoke.ClassA *);
void debug_symbols_smoke.Main::main(java.lang.String[] *);
void debug_symbols_smoke.Main::thisIsTheEnd(java.util.List *);
Contrast this to a JDK 11-based mandrel 21.3 produced native image:
$ strings ./debug-symbols-smoke-mandrel-21.3-jdk11 | grep com.oracle.svm.core.VM=
com.oracle.svm.core.VM=GraalVM 21.3.0-dev Java 11 Mandrel Distribution
$ strings ./debug-symbols-smoke-mandrel-21.3-jdk11 | grep com.oracle.svm.core.VM.Java.Version
com.oracle.svm.core.VM.Java.Version=11.0.14-internal
$ gdb -ex 'info functions .*smoke.*' ./debug-symbols-smoke-mandrel-21.3-jdk11
GNU gdb (GDB) Fedora 11.1-5.fc35
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./debug-symbols-smoke-mandrel-21.3-jdk11...
All functions matching regular expression ".*smoke.*":
File debug_symbols_smoke/ClassA.java:
java.lang.String *debug_symbols_smoke.ClassA::toString(void);
File debug_symbols_smoke/Main.java:
void debug_symbols_smoke.Main$$Lambda$575/0x00000007c0d82c40::accept(java.lang.Object *);
void debug_symbols_smoke.Main::lambda$thisIsTheEnd$0(java.io.ByteArrayOutputStream *, debug_symbols_smoke.ClassA *);
void debug_symbols_smoke.Main::main(java.lang.String[] *);
void debug_symbols_smoke.Main::thisIsTheEnd(java.util.List *);
Additional info:
I've noticed that the mandrel integration test for this fails for JDK 17-based builds.
Configuration:
- OS: Fedora 35
- Architecture: AMD64
- Mandrel version: 21.3.1.0-Final
- JDK version: 17.0.2+8