[PATCH] 8210810: Incorrect argument file parser behavior in certain cases

Alan Bateman Alan.Bateman at oracle.com
Tue Sep 25 06:19:12 UTC 2018

On 25/09/2018 02:01, Bo Zhang wrote:
> Hi all,
> This is my first time to try to submit a patch. Please forgive me if I did anything inappropriate. I’ve signed OCA.
> Bug description:
> 8210810 <https://bugs.openjdk.java.net/browse/JDK-8210810>: Incorrect argument file parser behavior in certain cases
> Previously, if a quoted backslash character appears at argument file
> parser buffer boundary (i.e. 4096th/8192nd/... character of an argument
> file is backslash '\'), the segment before the backslash character will
> be added into argument twice due to a missing anchor position reset
> operation.
> For example, you have an argument file:
> -cp "...a\\b"
> and the 4096th and 4097th characters happen to be both '\', the result
> generated by the argument file parser would be:
> -cp "...aa\\b”
> This patch fixes the issue by resetting anchor position correctly
> in this case.
> I’m a little surprised that this issue has existed for several years unnoticed.
The java launcher support for @argument files is new since JDK 9 so it's 
possible this case with quoting wasn't noticed before. It would be good 
to get that fixed.

Can you bring this to core-libs-dev for discussion as that is where 
issues with the java launcher are discussed? Also can you include the 
name that you used when signing the OCA in case it is different to the 
name in your mail address.


More information about the jdk-dev mailing list