[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-hotspot-runtime-dev
Subject: Re: RFR: 8332287: When printing arguments in error logs, quote arguments with whitespaces [v2]
From: Thomas Stuefe <stuefe () openjdk ! org>
Date: 2024-05-18 5:20:06
Message-ID: DftMVY3zWeOULGsxhRLVCllWfXO9IILbPO-uari7bW4=.f75fd406-a00f-4327-9756-d8e6e46a3578 () github ! com
[Download RAW message or body]
On Fri, 17 May 2024 14:22:23 GMT, Kevin Walls <kevinw@openjdk.org> wrote:
> > But how would I know the original?
>
> I don't think you can. 8-) That may be why it's currently done as it is, if the \
> quote placement is lost we just can't put it back and know it was correct.
> This next one may be a bit artificial, but we should also at least acknowledge the \
> case where an argument has an embedded quote character, e.g. escaped with a \
> backslash before I type it. There might be an XX or other option where that could \
> apply at some point. You don't get a String you can paste, unless we escape quotes \
> when printing in print_jvm_args_on(). And we don't want to make that much more \
> complicated. We can either print the escape \ before any quotes, or just note in \
> the bug that this is not always a trivial problem, although it is trivial for many \
> cases.
How deep down the rabbit hole do we go? Escape both single- and double-quotes? What \
if they are already escaped?
Tbh, I would have liked this to be a small patch without burning too much time on it. \
I think what you describe is a rare outlier case (arguments that contain both \
whitespaces and quotes). Wheras the spaces-in-arguments is something that regularly \
occurs during many jtreg tests.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/19248#issuecomment-2118646010
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic