RFR: 8293806: JDK_JAVA_OPTIONS picked up twice if launcher re-executes itself
Dmitry Samersoff
dsamersoff at openjdk.org
Tue Dec 6 14:13:15 UTC 2022
If the user has set LD_LIBRARY_PATH to use a particular libjvm.so, options from the JDK_JAVA_OPTIONS environment variable are picked up twice.
If an option cannot be accepted twice (e.g., -agentlib), the application fails to start.
The same happens on operating systems that doesn't support $RPATH/$ORIGIN and always have to set LD_LIBRARY_PATH and re-exec the launcher.
This fix takes the approach to re-launch as early as possible, as discussed here:
https://github.com/openjdk/jdk/pull/10430
This PR consists of three commits:
1. Cleanup of java_md.c
2. The implementation of early re-launch
3. Performance optimization
@AlanBateman, @dholmes-ora Alan, David - any comments are appreciated.
-------------
Commit messages:
- 8293806: performance optimization
- 8293806: core functionality
- 8293806: cleanup of java_md.c
Changes: https://git.openjdk.org/jdk/pull/11538/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11538&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8293806
Stats: 216 lines in 6 files changed: 113 ins; 70 del; 33 mod
Patch: https://git.openjdk.org/jdk/pull/11538.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/11538/head:pull/11538
PR: https://git.openjdk.org/jdk/pull/11538
More information about the hotspot-runtime-dev
mailing list