[jdk8u-dev] RFR: 8288483: JAVA_TOOL_OPTIONS are silently truncated if they exceed 1024 bytes
Paul Hohensee
phh at openjdk.org
Thu Jun 16 22:24:53 UTC 2022
On Wed, 15 Jun 2022 17:34:51 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
Nit: in arguments.hpp, move the declaration or parse_arguments_buffer down 2 lines after parse_java_options_environment variable to match tip's relative placement.
Otherwise fine.
-------------
Changes requested by phh (Reviewer).
PR: https://git.openjdk.org/jdk8u-dev/pull/74
More information about the jdk8u-dev
mailing list