RFR: 8339460: CDS error when module is located in a directory with space in the name [v3]
Maxim Kartashev
mkartashev at openjdk.org
Wed Sep 25 09:14:37 UTC 2024
On Tue, 24 Sep 2024 17:10:12 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:
> So if `isxdigit(str[index + 1])` is false, it won't proceed to check `isxdigit(str[index + 2])`? The bound check I'm thinking about is like the following:
That is exactly correct.
> The bound check I'm thinking about is like the following:
>
> ```
> if (index >= strlen(str) - 2) {
> return str[index];
> }
> ```
This seems unnecessary as we already assume that the string is null-terminated in the caller, and, as I have demonstrated out earlier, null-terminated strings are quite safe to check character-by-character.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20987#discussion_r1774864980
More information about the hotspot-runtime-dev
mailing list