On Mon, 9 Mar 2026 10:17:38 GMT, Volkan Yazici <[email protected]> wrote:
> Improve input validation checks and documentation of the > `java.lang.StringUTF16` intrinsics. > > ### References: > > - [JDK-8374582] #29164 — ditto for `java.lang.StringCoding` > - [JDK-8367129] #28832 — ditto for `java.lang.StringLatin1` > > [JDK-8367129]: https://bugs.openjdk.org/browse/JDK-8367129 > [JDK-8374582]: https://bugs.openjdk.org/browse/JDK-8374582 Thanks for your continued work on range checks @vy. Overall it look good. I've had a first look and left a couple of inline comments. src/hotspot/share/opto/library_call.cpp line 846: > 844: } > 845: > 846: #define RETURN_ON_BAILOUT(region, ...) \ I was wondering if it wouldn't be cleaner to avoid creating a macro in this case and instead e.g. have 2 regular methods, one that "initializes the halt nodes" and the other that "finalizes the halt nodes" (it might be slightly better if you need to debug and slightly less risky with variable shadowing... no strong opinion about it though) src/hotspot/share/opto/library_call.cpp line 862: > 860: if (stopped()) { \ > 861: return true; \ > 862: } Since you use the `while(0)` idiom I think it would make sense to move this inside as well. ------------- PR Review: https://git.openjdk.org/jdk/pull/30139#pullrequestreview-3916364543 PR Review Comment: https://git.openjdk.org/jdk/pull/30139#discussion_r2906440868 PR Review Comment: https://git.openjdk.org/jdk/pull/30139#discussion_r2906283852
