RFR: 8325567: jspawnhelper without args fails with segfault [v7]

Vladimir Petko vpetko at openjdk.org
Thu Mar 7 20:06:59 UTC 2024


On Thu, 7 Mar 2024 19:44:11 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> Elif Aslan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Add args[0] back
>
> test/jdk/java/lang/ProcessBuilder/JspawnhelperWarnings.java line 56:
> 
>> 54:     public static void main(String[] args) throws Exception {
>> 55:         for (int nArgs = 0; nArgs < 10; nArgs++) {
>> 56:             tryWithNArgs(nArgs);
> 
> Running with more than 3 arguments is unnecessary. Yes, its quick but just burns cpu.
> 
> When running with 2 arguments, the failure mode is not due to the number of arguments but is because argument 1 is formatted incorrectly;  should be `"%d:%d:%d"`. Though I supposed this falls into the "incorrect use category".

I wonder if it would make sense to add a test with a correct argument format?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18112#discussion_r1516754742


More information about the core-libs-dev mailing list