RFR: 8257420: Zero VM build broken with clang after JDK-8256726 due to strlen() is not a constexpr [v3]
Jie Fu
jiefu at openjdk.java.net
Mon Nov 30 23:37:57 UTC 2020
On Mon, 30 Nov 2020 17:08:58 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> Looks fine.
>
> I guess another solution would have been
>
> ```
> #define MSGFMT "Index %d out of bounds for length %d"
> #define add_len sizeof(MSGFMT)
> ..
> char message[2 * jintAsStringSize + add_len];
> ..
> jio_snprintf(message, sizeof(message), MSGFMT, \
> ...
> ```
>
> to spare you the character counting
Nice skill. Got it.
Thanks.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1518
More information about the hotspot-runtime-dev
mailing list