RFR: 8254702: jpackage app launcher crashes on CentOS
Alexey Semenyuk
asemenyuk at openjdk.java.net
Fri Jan 29 21:51:17 UTC 2021
Fix for https://bugs.openjdk.java.net/browse/JDK-8254702
The fix splits Linux app launcher in app launcher and launcher shared lib. App launcher is pure C and doesn't have C++ code. App launcher lib incorporates bulk of C++ code from app launcher.
At startup app launcher loads launcher shared lib and calls functions it provides to get data for launching JVM (path to jli lib and arguments for JLI_Launch function call).
App launcher unloads launcher shared lib before launching JVM to remove C++ runtime from the process memory.
Getting rid of C++ code from app launcher required to rewrite app installation location lookup code from C++ to C. LinuxPackage.c source is C alternative for https://github.com/openjdk/jdk/blob/master/src/jdk.jpackage/linux/native/applauncher/Package.cpp and https://github.com/openjdk/jdk/blob/master/src/jdk.jpackage/linux/native/applauncher/Executor.cpp.
Layout of jpackage's native code changed:
- `common`: code shared between all jpackage binaries.
- `applauncher`: launcher only code.
- `applauncherlib`: launcher lib code on Linux and launcher code on other platforms.
- `applaunchercommon`: code shared between launcher and launcher lib on Linux and launcher code on other platforms.
-------------
Commit messages:
- 8254702: jpackage app launcher crashes on CentOS
- 8254702: jpackage app launcher crashes on CentOS
- 8254702: jpackage app launcher crashes on CentOS
- 8254702: jpackage app launcher crashes on CentOS
- 8254702: jpackage app launcher crashes on CentOS
- 8254702: jpackage app launcher crashes on CentOS
- It works!
- 8254702: jpackage app launcher crashes on CentOS
- strerror bugfix
- Add helper makefile to build jpackage native code only
- ... and 1 more: https://git.openjdk.java.net/jdk/compare/20e7df50...14d277a2
Changes: https://git.openjdk.java.net/jdk/pull/2320/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2320&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8254702
Stats: 1823 lines in 24 files changed: 1376 ins; 420 del; 27 mod
Patch: https://git.openjdk.java.net/jdk/pull/2320.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/2320/head:pull/2320
PR: https://git.openjdk.java.net/jdk/pull/2320
More information about the build-dev
mailing list