RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v2]
Volkan Yazici
vyazici at openjdk.org
Tue Jul 15 20:26:41 UTC 2025
On Tue, 15 Jul 2025 19:45:33 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
>> Volkan Yazici has updated the pull request incrementally with three additional commits since the last revision:
>>
>> - Minimize the number of touched lines in `vmIntrinsics.hpp`
>> - Remove Markdown-styling in comments
>> - Improve wording of the `VerifyIntrinsicChecks` flag
>
> src/java.base/share/classes/sun/nio/cs/ISO_8859_1.java line 201:
>
>> 199: int len = (dlen < slen) ? dlen : slen;
>> 200: try {
>> 201: int ret = len <= 0 ? 0 : encodeISOArray(sa, sp, da, dp, len);
>
> Moving the length correction into `encodeISOArray` would help other callers too. (There's only 1 at the moment).
I've tried to make the code such that wrapper functions contain nothing but argument checks. Moving `if (len <= 0) { return 0; }` logic to the wrapper function will introduce a behavior different than the one implemented by the intrinsic. @RogerRiggs, do you still prefer me to carry out this change?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25998#discussion_r2208585771
More information about the graal-dev
mailing list