RFR: 8308410: broken compilation of test\jdk\tools\launcher\exeJliLaunchTest.c

Alan Bateman alanb at openjdk.org
Fri May 19 12:38:49 UTC 2023


On Fri, 19 May 2023 12:08:55 GMT, Adam Sotona <asotona at openjdk.org> wrote:

> JDK-8303669 patch to test\jdk\tools\launcher\exeJliLaunchTest.c broke compilation on windows.
> Unfortunately MSVC does not support variable length arrays.
> This patch fixes test\jdk\tools\launcher\exeJliLaunchTest.c to use dynamic array allocation.
> 
> Please review.
> 
> Thanks,
> Adam

test/jdk/tools/launcher/exeJliLaunchTest.c line 39:

> 37: {
> 38:     //avoid null-terminated array of arguments to test JDK-8303669
> 39:     char **argv = malloc(sizeof(char *) * argc);

If this is building on all platforms then okay but I would have expected you'd need a cast here.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14060#discussion_r1198910081


More information about the core-libs-dev mailing list