[jdk8u-dev] RFR: 8288483: JAVA_TOOL_OPTIONS are silently truncated if they exceed 1024 bytes [v2]
Severin Gehwolf
sgehwolf at openjdk.org
Wed Sep 7 17:18:48 UTC 2022
On Fri, 17 Jun 2022 13:08:58 GMT, Dmitry Samersoff <dsamersoff at openjdk.org> wrote:
>> 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.
>>
>> It's partial backport of relevant changes from JDK-8135195, JDK-8074895, JDK-8061999
>
> Dmitry Samersoff has updated the pull request incrementally with one additional commit since the last revision:
>
> 8288483: JAVA_TOOL_OPTIONS are silently truncated if they exceed 1024 bytes
This seems a high-risk backport. As far as I can see it's not explained why it's needed. Especially why now? 8u has been around for some time without that fix. We cannot just backport everything.
-------------
PR: https://git.openjdk.org/jdk8u-dev/pull/74
More information about the jdk8u-dev
mailing list