RFR: 8374523: [BACKOUT] Move input validation checks to Java for java.lang.StringCoding intrinsics
Volkan Yazici
vyazici at openjdk.org
Tue Jan 6 09:59:56 UTC 2026
On Tue, 6 Jan 2026 09:06:27 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Back out `java.lang.StringCoding` changes delivered in [JDK-8361842] (#25998 & 655dc516c22), which causes regressions reported in [JDK-8374210].
>>
>> [JDK-8361842]: https://bugs.openjdk.org/browse/JDK-8361842
>> [JDK-8374210]: https://bugs.openjdk.org/browse/JDK-8374210
>
> src/java.base/share/classes/jdk/internal/access/JavaLangAccess.java line 455:
>
>> 453: * compatible.
>> 454: * <p>
>> 455: * <b>WARNING: This method does not perform any bound checks.</b>
>
> These two lines are not in the original commit?
>
> https://github.com/openjdk/jdk/commit/655dc516c22ac84fccee6b1fdc607c492465be6b#diff-bd92d760986b9249dd3c02cc147db4f7e9dbbef90afef4971ee497a50e48c740
In chronological order:
1. 8fcfddb2d202 renamed `encodeASCII` to `uncheckedEncodeASCII` and added the `WARNING` clause.
2. 655dc516c22a, the commit this PR is reverting, renamed the method back to `encodeASCII` and removed the `WARNING`. This was possible, since `StringCoding::implEncodeAsciiArray` was hardened with necessary checks in the very same commit.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29055#discussion_r2664348820
More information about the core-libs-dev
mailing list