Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v8]

2025-07-17 Thread Raffaello Giulietti
On Thu, 17 Jul 2025 14:29:08 GMT, Raffaello Giulietti wrote: > What is the thinking when an `@IntrinsicCandidate` method invokes another > `@IntrinsicCandidate` method? Which part is responsible for the checks? > > For example, the Java code of `StringCoding.encodeISOArray0()` invokes > `Stri

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v8]

2025-07-17 Thread Yudi Zheng
On Thu, 17 Jul 2025 07:20:34 GMT, Volkan Yazici wrote: >> Validate input in `java.lang.StringCoding` intrinsic Java wrappers, improve >> their documentation, enhance the checks in the associated IR or assembly >> code, and adapt them to cause VM crash on invalid input. >> >> ## Implementation

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v8]

2025-07-17 Thread Raffaello Giulietti
On Thu, 17 Jul 2025 07:20:34 GMT, Volkan Yazici wrote: >> Validate input in `java.lang.StringCoding` intrinsic Java wrappers, improve >> their documentation, enhance the checks in the associated IR or assembly >> code, and adapt them to cause VM crash on invalid input. >> >> ## Implementation

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v8]

2025-07-17 Thread Roger Riggs
On Thu, 10 Jul 2025 12:20:45 GMT, Volkan Yazici wrote: >> Volkan Yazici has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Replace casting with `as_Region()` in `generate_string_range_check` > > src/java.base/share/classes/java/lang/StringC

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v8]

2025-07-17 Thread Raffaello Giulietti
On Thu, 17 Jul 2025 07:20:34 GMT, Volkan Yazici wrote: >> Validate input in `java.lang.StringCoding` intrinsic Java wrappers, improve >> their documentation, enhance the checks in the associated IR or assembly >> code, and adapt them to cause VM crash on invalid input. >> >> ## Implementation

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v8]

2025-07-17 Thread Raffaello Giulietti
On Thu, 10 Jul 2025 12:18:25 GMT, Volkan Yazici wrote: >> Volkan Yazici has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Replace casting with `as_Region()` in `generate_string_range_check` > > src/java.base/share/classes/java/lang/StringC

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v8]

2025-07-17 Thread Raffaello Giulietti
On Thu, 17 Jul 2025 07:20:34 GMT, Volkan Yazici wrote: >> Validate input in `java.lang.StringCoding` intrinsic Java wrappers, improve >> their documentation, enhance the checks in the associated IR or assembly >> code, and adapt them to cause VM crash on invalid input. >> >> ## Implementation

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v8]

2025-07-17 Thread Damon Fenacci
On Thu, 17 Jul 2025 07:20:34 GMT, Volkan Yazici wrote: >> Validate input in `java.lang.StringCoding` intrinsic Java wrappers, improve >> their documentation, enhance the checks in the associated IR or assembly >> code, and adapt them to cause VM crash on invalid input. >> >> ## Implementation

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v8]

2025-07-17 Thread Tobias Hartmann
On Thu, 17 Jul 2025 07:20:34 GMT, Volkan Yazici wrote: >> Validate input in `java.lang.StringCoding` intrinsic Java wrappers, improve >> their documentation, enhance the checks in the associated IR or assembly >> code, and adapt them to cause VM crash on invalid input. >> >> ## Implementation

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v8]

2025-07-17 Thread Volkan Yazici
On Thu, 17 Jul 2025 07:04:00 GMT, Tobias Hartmann wrote: >> @TobiHartmann, this change results in the following compiler error: >> >> >> /home/vy/.../src/hotspot/share/opto/library_call.cpp:958:35: error: invalid >> conversion from 'Node*' to 'RegionNode*' [-fpermissive] >> 958 | generate_

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v8]

2025-07-17 Thread Volkan Yazici
> Validate input in `java.lang.StringCoding` intrinsic Java wrappers, improve > their documentation, enhance the checks in the associated IR or assembly > code, and adapt them to cause VM crash on invalid input. > > ## Implementation notes > > The goal of the associated umbrella issue > [JDK-8

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v7]

2025-07-17 Thread Tobias Hartmann
On Thu, 17 Jul 2025 04:35:01 GMT, Volkan Yazici wrote: >> src/hotspot/share/opto/library_call.cpp line 963: >> >>> 961: >>> 962: if (bailout->req() > 1) { >>> 963: if (halt) { >> >> Toggle to force a VM crash to be used to surface intrinsic Java wrappers >> failing to spot invalid input

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v7]

2025-07-16 Thread Volkan Yazici
On Thu, 17 Jul 2025 06:13:30 GMT, Volkan Yazici wrote: >> Validate input in `java.lang.StringCoding` intrinsic Java wrappers, improve >> their documentation, enhance the checks in the associated IR or assembly >> code, and adapt them to cause VM crash on invalid input. >> >> ## Implementation

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v7]

2025-07-16 Thread Volkan Yazici
On Thu, 17 Jul 2025 06:13:30 GMT, Volkan Yazici wrote: >> Validate input in `java.lang.StringCoding` intrinsic Java wrappers, improve >> their documentation, enhance the checks in the associated IR or assembly >> code, and adapt them to cause VM crash on invalid input. >> >> ## Implementation

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v3]

2025-07-16 Thread Volkan Yazici
On Wed, 16 Jul 2025 05:28:55 GMT, Tobias Hartmann wrote: >> Volkan Yazici has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 12 additional >> commi

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v7]

2025-07-16 Thread Volkan Yazici
> Validate input in `java.lang.StringCoding` intrinsic Java wrappers, improve > their documentation, enhance the checks in the associated IR or assembly > code, and adapt them to cause VM crash on invalid input. > > ## Implementation notes > > The goal of the associated umbrella issue > [JDK-8

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v6]

2025-07-16 Thread Volkan Yazici
On Thu, 10 Jul 2025 12:23:06 GMT, Volkan Yazici wrote: >> Volkan Yazici has refreshed the contents of this pull request, and previous >> commits have been removed. The incremental views will show differences >> compared to the previous content of the PR. The pull request contains one >> new co

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v6]

2025-07-16 Thread Volkan Yazici
> Validate input in `java.lang.StringCoding` intrinsic Java wrappers, improve > their documentation, enhance the checks in the associated IR or assembly > code, and adapt them to cause VM crash on invalid input. > > ## Implementation notes > > The goal of the associated umbrella issue > [JDK-8

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v5]

2025-07-16 Thread Volkan Yazici
> Validate input in `java.lang.StringCoding` intrinsic Java wrappers, improve > their documentation, enhance the checks in the associated IR or assembly > code, and adapt them to cause VM crash on invalid input. > > ## Implementation notes > > The goal of the associated umbrella issue > [JDK-8

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v4]

2025-07-16 Thread Volkan Yazici
> Validate input in `java.lang.StringCoding` intrinsic Java wrappers, improve > their documentation, enhance the checks in the associated IR or assembly > code, and adapt them to cause VM crash on invalid input. > > ## Implementation notes > > The goal of the associated umbrella issue > [JDK-8

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v3]

2025-07-15 Thread Tobias Hartmann
On Tue, 15 Jul 2025 20:24:04 GMT, Volkan Yazici wrote: >> Validate input in `java.lang.StringCoding` intrinsic Java wrappers, improve >> their documentation, enhance the checks in the associated IR or assembly >> code, and adapt them to cause VM crash on invalid input. >> >> ## Implementation

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v3]

2025-07-15 Thread Roger Riggs
On Tue, 15 Jul 2025 20:24:04 GMT, Volkan Yazici wrote: >> Validate input in `java.lang.StringCoding` intrinsic Java wrappers, improve >> their documentation, enhance the checks in the associated IR or assembly >> code, and adapt them to cause VM crash on invalid input. >> >> ## Implementation

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v2]

2025-07-15 Thread Roger Riggs
On Tue, 15 Jul 2025 20:24:22 GMT, Volkan Yazici wrote: >> 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, >>>

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v2]

2025-07-15 Thread Volkan Yazici
On Tue, 15 Jul 2025 19:45:33 GMT, Roger Riggs 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

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v2]

2025-07-15 Thread Volkan Yazici
On Tue, 15 Jul 2025 19:25:31 GMT, Roger Riggs 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

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v3]

2025-07-15 Thread Volkan Yazici
> Validate input in `java.lang.StringCoding` intrinsic Java wrappers, improve > their documentation, enhance the checks in the associated IR or assembly > code, and adapt them to cause VM crash on invalid input. > > ## Implementation notes > > The goal of the associated umbrella issue > [JDK-8

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v2]

2025-07-15 Thread Roger Riggs
On Tue, 15 Jul 2025 19:21:28 GMT, Volkan Yazici wrote: >> Validate input in `java.lang.StringCoding` intrinsic Java wrappers, improve >> their documentation, enhance the checks in the associated IR or assembly >> code, and adapt them to cause VM crash on invalid input. >> >> ## Implementation

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v2]

2025-07-15 Thread Volkan Yazici
On Mon, 14 Jul 2025 10:32:24 GMT, Damon Fenacci wrote: > I left a couple of minor comments. I also noticed that you haven't yet added > the benchmark results to the description: do you want to run them again after > the reviews? @dafedafe, thanks so much for the review! I've implemented the ch

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v2]

2025-07-15 Thread Volkan Yazici
On Mon, 14 Jul 2025 09:11:08 GMT, Damon Fenacci 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 >> - Improv

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v2]

2025-07-15 Thread Volkan Yazici
On Mon, 14 Jul 2025 10:27:45 GMT, Damon Fenacci 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 >> - Improv

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v2]

2025-07-15 Thread Volkan Yazici
On Mon, 14 Jul 2025 08:49:44 GMT, Damon Fenacci 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 >> - Improv

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v2]

2025-07-15 Thread Volkan Yazici
> Validate input in `java.lang.StringCoding` intrinsic Java wrappers, improve > their documentation, enhance the checks in the associated IR or assembly > code, and adapt them to cause VM crash on invalid input. > > ## Implementation notes > > The goal of the associated umbrella issue > [JDK-8

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics

2025-07-14 Thread Damon Fenacci
On Thu, 26 Jun 2025 10:48:37 GMT, Volkan Yazici wrote: > Validate input in `java.lang.StringCoding` intrinsic Java wrappers, improve > their documentation, enhance the checks in the associated IR or assembly > code, and adapt them to cause VM crash on invalid input. > > ## Implementation notes

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics

2025-07-11 Thread Volkan Yazici
On Thu, 10 Jul 2025 20:54:24 GMT, John R Rose wrote: >> Validate input in `java.lang.StringCoding` intrinsic Java wrappers, improve >> their documentation, enhance the checks in the associated IR or assembly >> code, and adapt them to cause VM crash on invalid input. >> >> ## Implementation no