On Mon, 11 May 2026 19:27:56 GMT, Robert Toyonaga <[email protected]> wrote:

>> For more information. see:
>> 
>> https://bugs.openjdk.org/browse/JDK-8372760
>> 
>> Testing: tier1 + test/jdk/jdk/jfr + manual testing
>> 
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> src/hotspot/share/jfr/periodic/jfrRedactedEvents.cpp line 538:
> 
>> 536:   const char* end = p + strlen(p);
>> 537:   while (p < end) {
>> 538:     while (p < end && is_separator(*p)) {
> 
> `make_java_args_array` uses `is_separator`, which always recognizes spaces as 
> delimiters. 
> Is it possible to have arguments with intentional spaces like 
> "/some/path/with spaces/example"? 
> If so, would that negatively affect filters that try to match a sequence of 
> arguments like 'redact-argument=--password * *'  ?

If you pass Java arguments (not VM options) with quoted strings to the Java 
process with an intentional space, e.g. "/some/path/with spaces/example", the 
launcher destroys the separation and gives the JVM only a single string, so 
there is no way to know if the space was intentional or not. 

(when the launcher invokes main(String[]...) they are separated)

>From a technical standpoint,  *p == ' ' would be better in 
>make_java_args_array.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/29736#discussion_r3221744095

Reply via email to