[jdk8u-dev] RFR: 8288483: JAVA_TOOL_OPTIONS are silently truncated if they exceed 1024 bytes
Dmitry Samersoff
dsamersoff at openjdk.java.net
Wed Jun 15 14:56:31 UTC 2022
… bytes
The JAVA_TOOL_OPTIONS environment variable is used to pass additional JVM arguments.
The current implementation in jdk8 has an internal limit on the length of the option variable (1024 bytes) and the number of options (64).
A longer variable will be silently truncated and some options will be lost or the VM will exist with an unrecognized option error.
The fix is not a direct backport of the changes in the later JDKs, but I kept the code as close as possible to what we have in the latest jdk.
-------------
Commit messages:
- 8288483: JAVA_TOOL_OPTIONS are silently truncated if they exceed 1024 bytes
Changes: https://git.openjdk.org/jdk8u-dev/pull/72/files
Webrev: https://webrevs.openjdk.org/?repo=jdk8u-dev&pr=72&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8288483
Stats: 111 lines in 2 files changed: 50 ins; 16 del; 45 mod
Patch: https://git.openjdk.org/jdk8u-dev/pull/72.diff
Fetch: git fetch https://git.openjdk.org/jdk8u-dev pull/72/head:pull/72
PR: https://git.openjdk.org/jdk8u-dev/pull/72
More information about the jdk8u-dev
mailing list