Re: RFR: 8349944: [JMH] sun.misc.UnsafeOps cannot access class jdk.internal.misc.Unsafe [v3]

2025-04-16 Thread Hao Sun
On Thu, 17 Apr 2025 03:13:05 GMT, Nicole Xu wrote: >> The UnsafeOps JMH benchmark fails with the following error: >> >> ``` >> java.lang.IllegalAccessError: class >> org.openjdk.bench.sun.misc.UnsafeOps (in unnamed module @0x520a3426) cannot >> access class jdk.internal.misc.Unsafe

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v10]

2025-04-16 Thread Calvin Cheung
On Wed, 16 Apr 2025 14:34:25 GMT, Timofei Pushkin wrote: >> If a base class is package-private then its subclasses should have the same >> package name and defining class loader, otherwise `IllegalAccessError` is >> thrown when linking a subclass. Currently when dumping a static archive >> sep

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v8]

2025-04-16 Thread Calvin Cheung
On Wed, 16 Apr 2025 07:50:00 GMT, Timofei Pushkin wrote: >> src/java.base/share/classes/jdk/internal/misc/CDS.java line 390: >> >>> 388: @Override >>> 389: public byte[] readClassFile(String className) throws >>> IOException { >>> 390: final var subPath =

Re: RFR: 8349944: [JMH] sun.misc.UnsafeOps cannot access class jdk.internal.misc.Unsafe [v3]

2025-04-16 Thread Chen Liang
On Thu, 17 Apr 2025 03:13:05 GMT, Nicole Xu wrote: >> The UnsafeOps JMH benchmark fails with the following error: >> >> ``` >> java.lang.IllegalAccessError: class >> org.openjdk.bench.sun.misc.UnsafeOps (in unnamed module @0x520a3426) cannot >> access class jdk.internal.misc.Unsafe

Re: RFR: 8353214: Add testing with --enable-preview

2025-04-16 Thread Chen Liang
On Thu, 17 Apr 2025 00:24:50 GMT, Leonid Mesnik wrote: > Added problemlists and and requires for execution tests with --enable-preview. > > The --enable-preview features might significantly change VM/JDK behavior and > sometimes it is useful to run tests with preview features enabled. Eventuall

Re: RFR: 8349944: [JMH] sun.misc.UnsafeOps cannot access class jdk.internal.misc.Unsafe [v3]

2025-04-16 Thread Nicole Xu
> The UnsafeOps JMH benchmark fails with the following error: > > ``` > java.lang.IllegalAccessError: class > org.openjdk.bench.sun.misc.UnsafeOps (in unnamed module @0x520a3426) cannot > access class jdk.internal.misc.Unsafe (in module java.base) because module > java.base does not

Re: RFR: 8349944: [JMH] sun.misc.UnsafeOps cannot access class jdk.internal.misc.Unsafe [v3]

2025-04-16 Thread Liam Miller-Cushon
On Thu, 17 Apr 2025 03:37:03 GMT, Hao Sun wrote: > I was wondering if `--disable-java-warnings-as-errors` could help to address > your concern about this PR. It doesn't address the issue unless it's configured by default, which I don't think is being proposed. I think the best approach would b

Re: RFR: 8077587: BigInteger Roots [v5]

2025-04-16 Thread fabioromano1
> This PR implements nth root computation for `BigInteger`s using Newton method > and optimizes `BigInteger.pow(int)` method. > [Here is a proof of convergence of the recurrence > used.](https://github.com/user-attachments/files/19785045/nth_root_newton_proof_integers.pdf) fabioromano1 has updat

Re: RFR: 8077587: BigInteger Roots [v4]

2025-04-16 Thread fabioromano1
> This PR implements nth root computation for `BigInteger`s using Newton method > and optimizes `BigInteger.pow(int)` method. > [Here is a proof of convergence of the recurrence > used.](https://github.com/user-attachments/files/19785045/nth_root_newton_proof_integers.pdf) fabioromano1 has updat

Re: RFR: 8351623: VectorAPI: Refactor subword gather load and add SVE implementation

2025-04-16 Thread Xiaohong Gong
On Wed, 16 Apr 2025 08:58:34 GMT, Xiaohong Gong wrote: > ### Summary: > [JDK-8318650](http://java-service.client.nvidia.com/?q=8318650) added the > hotspot intrinsifying of subword gather load APIs for X86 platforms [1]. This > patch aims at implementing the equivalent functionality for AArch64

Re: RFR: 8353786: Migrate Vector API math library support to FFM API [v5]

2025-04-16 Thread Xiaohong Gong
On Wed, 16 Apr 2025 18:26:18 GMT, Vladimir Ivanov wrote: >> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/VectorMathLibrary.java >> line 240: >> >>> 238: if (isAARCH64() && vspecies.vectorBitSize() > 128) { >>> 239: return false; // FIXME: SVE s

Re: RFR: 8353786: Migrate Vector API math library support to FFM API [v8]

2025-04-16 Thread Vladimir Ivanov
> Migrate Vector API math library (SVML and SLEEF) linkage from native code (in > JVM) to Java FFM API. > > Since FFM API doesn't support vector calling conventions yet, migration > affects only symbol lookup for now. But it still enables significant > simplifications on JVM side. > > The patc

RFR: 8353214: Add testing with --enable-preview

2025-04-16 Thread Leonid Mesnik
Added problemlists and and requires for execution tests with --enable-preview. The --enable-preview features might significantly change VM/JDK behavior and sometimes it is useful to run tests with preview features enabled. Eventually preview features should be made default and it is expected tha

Re: RFR: 8354464: Additional cleanup setting up native.encoding [v2]

2025-04-16 Thread Stuart Marks
On Wed, 16 Apr 2025 20:46:04 GMT, Naoto Sato wrote: >> The main focus of this commit is to straighten out the logic between the >> platform-specific and platform-independent layers. >> >> In the previous state of this file, tracing the origin of the properties on >> Windows, I ended up followi

Re: RFR: 8354344: Test behavior after cut-over for future ISO 4217 currency

2025-04-16 Thread Naoto Sato
On Wed, 16 Apr 2025 23:06:19 GMT, Justin Lu wrote: > As the test tracks the ISO 4217 data, manual testing of this change can be > done by modifying the cut-over year from 2025 to 2026 for the > `CW=ANG;2025-04-01-04-00-00;XCG` entry for both the JDK and test data. Would it be possible to use `

RFR: 8354898: jdk/internal/loader/NativeLibraries/Main.java fails on static JDK

2025-04-16 Thread Jiangli Zhou
Please review this simple test change that skips the test case loading using JDK `libzip.so` on static JDK in test/jdk/jdk/internal/loader/NativeLibraries/Main.java. AFAICT, the test case using `NativeLibrariesTest.LIB_NAME` (`libnativeLibrariesTest.so`) can provide coverage on static JDK. Tha

RFR: 8354344: Test behavior after cut-over for future ISO 4217 currency

2025-04-16 Thread Justin Lu
Please review this PR which improves the _ValidateISO4217_ Currency test by adding testing of future currencies after the transition date. This is done by creating a patched version of Currency that replaces `System.currentTimeMillis()` calls with a mocked value equivalent to `Long.MAX_VALUE`.

Re: RFR: 8077587: BigInteger Roots [v2]

2025-04-16 Thread fabioromano1
On Wed, 16 Apr 2025 22:05:34 GMT, fabioromano1 wrote: >> This PR implements nth root computation for `BigInteger`s using Newton >> method and optimizes `BigInteger.pow(int)` method. >> [Here is a proof of convergence of the recurrence >> used.](https://github.com/user-attachments/files/19785045

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v10]

2025-04-16 Thread Ioi Lam
On Wed, 16 Apr 2025 14:34:25 GMT, Timofei Pushkin wrote: >> If a base class is package-private then its subclasses should have the same >> package name and defining class loader, otherwise `IllegalAccessError` is >> thrown when linking a subclass. Currently when dumping a static archive >> sep

Re: RFR: 8077587: BigInteger Roots [v2]

2025-04-16 Thread fabioromano1
> This PR implements nth root computation for `BigInteger`s using Newton method > and optimizes `BigInteger.pow(int)` method. > [Here is a proof of convergence of the recurrence > used.](https://github.com/user-attachments/files/19785045/nth_root_newton_proof_integers.pdf) fabioromano1 has updat

Re: RFR: 8353786: Migrate Vector API math library support to FFM API [v7]

2025-04-16 Thread Paul Sandoz
On Wed, 16 Apr 2025 19:29:07 GMT, Vladimir Ivanov wrote: >> Migrate Vector API math library (SVML and SLEEF) linkage from native code >> (in JVM) to Java FFM API. >> >> Since FFM API doesn't support vector calling conventions yet, migration >> affects only symbol lookup for now. But it still e

Re: RFR: 8353786: Migrate Vector API math library support to FFM API [v7]

2025-04-16 Thread Paul Sandoz
On Wed, 16 Apr 2025 21:27:32 GMT, Vladimir Ivanov wrote: > Both `CPUFeatures.validateFeatures` and the checks it performs are > assertions, so it has to be explicitly enabled by `-esa`. The assert > validates some assumptions the code has about the format of features string > VM produces. And

Re: RFR: 8353786: Migrate Vector API math library support to FFM API [v7]

2025-04-16 Thread Vladimir Ivanov
On Wed, 16 Apr 2025 19:29:07 GMT, Vladimir Ivanov wrote: >> Migrate Vector API math library (SVML and SLEEF) linkage from native code >> (in JVM) to Java FFM API. >> >> Since FFM API doesn't support vector calling conventions yet, migration >> affects only symbol lookup for now. But it still e

Re: RFR: 8354522: Clones of DecimalFormat cause interferences when used concurrently [v8]

2025-04-16 Thread Johannes Graham
> The `DigitList` class used in `DecimalFormat` does not reset the `data` array > in its clone method. This can cause interference when clones are used > concurrently. Johannes Graham has updated the pull request incrementally with one additional commit since the last revision: use SkippedEx

Re: RFR: 8354464: Additional cleanup setting up native.encoding [v2]

2025-04-16 Thread Naoto Sato
On Wed, 16 Apr 2025 17:44:36 GMT, Stuart Marks wrote: >> src/java.base/windows/native/libjava/java_props_md.c line 663: >> >>> 661:&sprops.format_country, >>> 662:&sprops.format_variant, >>> 663:&format_encoding_

RFR: 8352003: Support --add-opens with -XX:+AOTClassLinking

2025-04-16 Thread Calvin Cheung
This RFE allows --add-opens to be specified for AOT cache creation. AOT cache can be used during production run with --add-opens option as long as the same set of options is used during assembly phase. Passed tiers 1 - 4 testing. - Commit messages: - trailing whitespace - 8352003

Re: RFR: 8354522: Clones of DecimalFormat cause interferences when used concurrently [v9]

2025-04-16 Thread Naoto Sato
On Wed, 16 Apr 2025 17:40:39 GMT, Johannes Graham wrote: >> The `DigitList` class used in `DecimalFormat` does not reset the `data` >> array in its clone method. This can cause interference when clones are used >> concurrently. > > Johannes Graham has updated the pull request incrementally with

Re: RFR: 8351842: Windows specific issues in combination of JEP 493 and --with-external-symbols-in-bundles=public [v4]

2025-04-16 Thread Christoph Langer
> Alternative approach to #24012 > > This keeps the current handling of *.pdb vs *.stripped.pdb which allows > debugging at the cost of a little hack in jlink. Maybe the code in jlink can > be improved, e.g. make it more conditional. > > I'm running this through our testing still to see whether

Re: RFR: 8353786: Migrate Vector API math library support to FFM API [v5]

2025-04-16 Thread Vladimir Ivanov
On Wed, 16 Apr 2025 02:11:09 GMT, Xiaohong Gong wrote: >> Vladimir Ivanov 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 19 additional >> commi

Re: RFR: 8353786: Migrate Vector API math library support to FFM API [v7]

2025-04-16 Thread Vladimir Ivanov
> Migrate Vector API math library (SVML and SLEEF) linkage from native code (in > JVM) to Java FFM API. > > Since FFM API doesn't support vector calling conventions yet, migration > affects only symbol lookup for now. But it still enables significant > simplifications on JVM side. > > The patc

Re: RFR: 8353786: Migrate Vector API math library support to FFM API [v5]

2025-04-16 Thread Vladimir Ivanov
On Wed, 16 Apr 2025 00:25:59 GMT, Paul Sandoz wrote: >> Vladimir Ivanov 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 19 additional >> commits

Re: RFR: 8353786: Migrate Vector API math library support to FFM API [v5]

2025-04-16 Thread Vladimir Ivanov
On Wed, 16 Apr 2025 01:47:02 GMT, Xiaohong Gong wrote: >> src/hotspot/share/opto/vectorIntrinsics.cpp line 488: >> >>> 486: // V binaryOp(long address, Class vClass, Class >>> elementType, int length, >>> 487: //V v1, V v2, >>> 488: //BinaryOperation defaultImpl) >> >>

Re: RFR: 8353786: Migrate Vector API math library support to FFM API [v6]

2025-04-16 Thread Vladimir Ivanov
> Migrate Vector API math library (SVML and SLEEF) linkage from native code (in > JVM) to Java FFM API. > > Since FFM API doesn't support vector calling conventions yet, migration > affects only symbol lookup for now. But it still enables significant > simplifications on JVM side. > > The patc

Integrated: 8352001: AOT cache should not contain classes injected into built-in class loaders

2025-04-16 Thread Ioi Lam
On Fri, 14 Mar 2025 05:28:47 GMT, Ioi Lam wrote: > During an application's training run, it's possible to inject classes into > the built-in platform/app class loaders with reflection calls. > > - Before [JDK-8348426](https://bugs.openjdk.org/browse/JDK-8348426), only the > names of these cla

Re: RFR: 8352001: AOT cache should not contain classes injected into built-in class loaders [v4]

2025-04-16 Thread Ioi Lam
On Wed, 16 Apr 2025 17:16:51 GMT, Calvin Cheung wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Removed unnecessary include > > Marked as reviewed by ccheung (Reviewer). Thanks @calvinccheung @calvinccheung for the rev

Re: RFR: 8354450: Using a File with a path containing a trailing space should fail when alternative data streams are disabled (win) [v2]

2025-04-16 Thread Alan Bateman
On Wed, 16 Apr 2025 17:23:41 GMT, Brian Burkhalter wrote: >> src/java.base/windows/classes/java/io/WinNTFileSystem.java line 372: >> >>> 370: int len = pathname.length(); >>> 371: if (len > 0 && pathname.charAt(len - 1) == ' ') >>> 372: return true; >> >> Can you thi

Re: RFR: 8354464: Additional cleanup setting up native.encoding [v2]

2025-04-16 Thread Stuart Marks
On Wed, 16 Apr 2025 14:43:45 GMT, Roger Riggs wrote: >> Stuart Marks 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 four additional >> commits

Re: RFR: 8354522: Clones of DecimalFormat cause interferences when used concurrently [v9]

2025-04-16 Thread Justin Lu
On Wed, 16 Apr 2025 17:40:39 GMT, Johannes Graham wrote: >> The `DigitList` class used in `DecimalFormat` does not reset the `data` >> array in its clone method. This can cause interference when clones are used >> concurrently. > > Johannes Graham has updated the pull request incrementally with

Re: RFR: 8354522: Clones of DecimalFormat cause interferences when used concurrently [v9]

2025-04-16 Thread Johannes Graham
> The `DigitList` class used in `DecimalFormat` does not reset the `data` array > in its clone method. This can cause interference when clones are used > concurrently. Johannes Graham has updated the pull request incrementally with one additional commit since the last revision: fix catch blo

Re: RFR: 8354424: java/util/logging/LoggingDeadlock5.java fails intermittently in tier6 [v2]

2025-04-16 Thread David Beaumont
> Increasing timeout for deadlock detection and adjusting for the timeout > factor in higher tiers. David Beaumont has updated the pull request incrementally with one additional commit since the last revision: Removing test from the problem list. - Changes: - all: https://git.

Re: RFR: 8354450: Using a File with a path containing a trailing space should fail when alternative data streams are disabled (win) [v2]

2025-04-16 Thread Brian Burkhalter
On Wed, 16 Apr 2025 09:21:41 GMT, Mikhail Yankelevich wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8354450: Add specific conditional for trailing space; adjust test > > test/jdk/java/io/File/WinTrailingSpac

Re: RFR: 8354450: Using a File with a path containing a trailing space should fail when alternative data streams are disabled (win) [v2]

2025-04-16 Thread Brian Burkhalter
On Wed, 16 Apr 2025 07:33:54 GMT, Alan Bateman wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8354450: Add specific conditional for trailing space; adjust test > > src/java.base/windows/classes/java/io/WinNTFi

Re: RFR: 8352001: AOT cache should not contain classes injected into built-in class loaders [v4]

2025-04-16 Thread Calvin Cheung
On Wed, 16 Apr 2025 17:12:07 GMT, Ioi Lam wrote: >> During an application's training run, it's possible to inject classes into >> the built-in platform/app class loaders with reflection calls. >> >> - Before [JDK-8348426](https://bugs.openjdk.org/browse/JDK-8348426), only >> the names of thes

Re: RFR: 8352001: AOT cache should not contain classes injected into built-in class loaders [v3]

2025-04-16 Thread Ioi Lam
On Wed, 16 Apr 2025 16:44:05 GMT, Calvin Cheung wrote: >> Ioi Lam 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 five additional commits >> sin

Re: RFR: 8352001: AOT cache should not contain classes injected into built-in class loaders [v4]

2025-04-16 Thread Ioi Lam
> During an application's training run, it's possible to inject classes into > the built-in platform/app class loaders with reflection calls. > > - Before [JDK-8348426](https://bugs.openjdk.org/browse/JDK-8348426), only the > names of these classes were recorded in the AOT config file. When the

Re: RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer [v5]

2025-04-16 Thread Jaikiran Pai
On Wed, 16 Apr 2025 16:58:50 GMT, Markus KARG wrote: > IIUC then you will be fine with a test that solely tests the default > implementation of CharSequence.getChars()? Correct. And a similar separate test for `CharBuffer.getChars()` since that one too is a new default implementation method. I

Re: RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer [v5]

2025-04-16 Thread Markus KARG
On Wed, 16 Apr 2025 16:47:33 GMT, Jaikiran Pai wrote: >It should be possible to just invoke `CharSequence.getChars()` on a >`CharSequence` instance to verify that its default method does what it >specifies. So these new tests won't be duplicating any existing test code. IIUC then you will be f

Re: RFR: 8352001: AOT cache should not contain classes injected into built-in class loaders [v3]

2025-04-16 Thread Calvin Cheung
On Wed, 16 Apr 2025 00:51:23 GMT, Ioi Lam wrote: >> During an application's training run, it's possible to inject classes into >> the built-in platform/app class loaders with reflection calls. >> >> - Before [JDK-8348426](https://bugs.openjdk.org/browse/JDK-8348426), only >> the names of thes

Re: RFR: 8354084: Streamline XPath API's extension function control [v5]

2025-04-16 Thread Roger Riggs
On Wed, 16 Apr 2025 16:26:41 GMT, Joe Wang wrote: >> Streamline the extension function control in the XPath API by relying solely >> on >> [XPathFunctionResolver](https://docs.oracle.com/en/java/javase/24/docs/api/java.xml/javax/xml/xpath/XPathFunctionResolver.html), >> which provides a secure

Re: RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer [v5]

2025-04-16 Thread Jaikiran Pai
On Wed, 16 Apr 2025 16:33:29 GMT, Markus KARG wrote: > If duplication is wanted, I will do it. I am just waiting for a majority to > clearly say that they want duplication. By duplication, do you mean copy pasting the `testReadBII(Reader reader)`, `testReadBIILenZero(Reader reader)`, `testRea

Re: RFR: 8354522: Clones of DecimalFormat cause interferences when used concurrently [v7]

2025-04-16 Thread Naoto Sato
On Wed, 16 Apr 2025 15:59:10 GMT, Johannes Graham wrote: >> The `DigitList` class used in `DecimalFormat` does not reset the `data` >> array in its clone method. This can cause interference when clones are used >> concurrently. > > Johannes Graham has updated the pull request incrementally with

Re: RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer [v5]

2025-04-16 Thread Markus KARG
On Wed, 16 Apr 2025 16:29:23 GMT, Jaikiran Pai wrote: > > Nevertheless, the tests are there, so no _new_ ones are needed. We can > > duplicate them, if a majority thinks it is beneficial. > > As noted in the contribution guide > (https://openjdk.org/guide/#testing-the-jdk), regression tests ar

Re: RFR: 8354084: Streamline XPath API's extension function control [v4]

2025-04-16 Thread Joe Wang
On Wed, 16 Apr 2025 13:47:28 GMT, Roger Riggs wrote: >> Joe Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> update javadoc for the jdk.xml.enableExtensionFunctions property > > src/java.xml/share/classes/module-info.java line 883: >

Re: RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer [v5]

2025-04-16 Thread Jaikiran Pai
On Sun, 30 Mar 2025 12:34:06 GMT, Markus KARG wrote: >> This Pull Request proposes an implementation for >> [JDK-8343110](https://bugs.openjdk.org/browse/JDK-8343110): Adding the new >> method `public void getChars(int srcBegin, int srcEnd, char[] dst, int >> dstBegin)` to the `CharSequence` i

Re: RFR: 8354084: Streamline XPath API's extension function control [v5]

2025-04-16 Thread Joe Wang
> Streamline the extension function control in the XPath API by relying solely > on > [XPathFunctionResolver](https://docs.oracle.com/en/java/javase/24/docs/api/java.xml/javax/xml/xpath/XPathFunctionResolver.html), > which provides a secure and developer-defined mechanism. Remove the feature >

Re: RFR: 8354084: Streamline XPath API's extension function control [v4]

2025-04-16 Thread Joe Wang
> Streamline the extension function control in the XPath API by relying solely > on > [XPathFunctionResolver](https://docs.oracle.com/en/java/javase/24/docs/api/java.xml/javax/xml/xpath/XPathFunctionResolver.html), > which provides a secure and developer-defined mechanism. Remove the feature >

Re: RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer [v5]

2025-04-16 Thread Markus KARG
On Wed, 16 Apr 2025 16:08:21 GMT, Jaikiran Pai wrote: >> Markus KARG has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Applied changes requested by Chen: 'We might need to specify the IOOBE >> behavior - when an IOOBE is thrown, some char

Re: RFR: 8301971: Make JDK source code UTF-8 [v3]

2025-04-16 Thread Naoto Sato
On Mon, 14 Apr 2025 12:53:35 GMT, Magnus Ihse Bursie wrote: >> Most of the JDK code base has been transitioned to UTF-8, but not all. This >> has recently become an acute problem, since our mixing of iso-8859-1 and >> utf-8 in properties files confused the version of `sed` that is shipped with

Re: RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer [v5]

2025-04-16 Thread Chen Liang
On Sun, 30 Mar 2025 12:34:06 GMT, Markus KARG wrote: >> This Pull Request proposes an implementation for >> [JDK-8343110](https://bugs.openjdk.org/browse/JDK-8343110): Adding the new >> method `public void getChars(int srcBegin, int srcEnd, char[] dst, int >> dstBegin)` to the `CharSequence` i

Re: RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer [v5]

2025-04-16 Thread Jaikiran Pai
On Sun, 30 Mar 2025 12:34:06 GMT, Markus KARG wrote: >> This Pull Request proposes an implementation for >> [JDK-8343110](https://bugs.openjdk.org/browse/JDK-8343110): Adding the new >> method `public void getChars(int srcBegin, int srcEnd, char[] dst, int >> dstBegin)` to the `CharSequence` i

Re: RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer [v5]

2025-04-16 Thread Markus KARG
On Sun, 30 Mar 2025 12:34:06 GMT, Markus KARG wrote: >> This Pull Request proposes an implementation for >> [JDK-8343110](https://bugs.openjdk.org/browse/JDK-8343110): Adding the new >> method `public void getChars(int srcBegin, int srcEnd, char[] dst, int >> dstBegin)` to the `CharSequence` i

Re: RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer [v5]

2025-04-16 Thread Markus KARG
On Sun, 30 Mar 2025 12:34:06 GMT, Markus KARG wrote: >> This Pull Request proposes an implementation for >> [JDK-8343110](https://bugs.openjdk.org/browse/JDK-8343110): Adding the new >> method `public void getChars(int srcBegin, int srcEnd, char[] dst, int >> dstBegin)` to the `CharSequence` i

Re: RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer [v5]

2025-04-16 Thread Chen Liang
On Sun, 30 Mar 2025 12:34:06 GMT, Markus KARG wrote: >> This Pull Request proposes an implementation for >> [JDK-8343110](https://bugs.openjdk.org/browse/JDK-8343110): Adding the new >> method `public void getChars(int srcBegin, int srcEnd, char[] dst, int >> dstBegin)` to the `CharSequence` i

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v10]

2025-04-16 Thread Timofei Pushkin
On Wed, 16 Apr 2025 14:34:25 GMT, Timofei Pushkin wrote: >> If a base class is package-private then its subclasses should have the same >> package name and defining class loader, otherwise `IllegalAccessError` is >> thrown when linking a subclass. Currently when dumping a static archive >> sep

Re: RFR: 8354522: Clones of DecimalFormat cause interferences when used concurrently [v7]

2025-04-16 Thread Johannes Graham
> The `DigitList` class used in `DecimalFormat` does not reset the `data` array > in its clone method. This can cause interference when clones are used > concurrently. Johannes Graham has updated the pull request incrementally with one additional commit since the last revision: reflective te

Re: RFR: 8354522: Clones of DecimalFormat cause interferences when used concurrently [v6]

2025-04-16 Thread Johannes Graham
On Tue, 15 Apr 2025 22:21:31 GMT, Johannes Graham wrote: >> The `DigitList` class used in `DecimalFormat` does not reset the `data` >> array in its clone method. This can cause interference when clones are used >> concurrently. > > Johannes Graham has updated the pull request incrementally with

RFR: 8077587: BigInteger Roots

2025-04-16 Thread fabioromano1
This PR implements nth root computation for `BigInteger`s using Newton method and optimizes `BigInteger.pow(int)` method. - Commit messages: - Remove trailing whitespaces - Merge branch 'openjdk:master' into BigInteger-nth-root - Add nthRoot(int) methods and optimize pow(int) Cha

Re: RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer [v5]

2025-04-16 Thread Roger Riggs
On Wed, 16 Apr 2025 14:42:38 GMT, Chen Liang wrote: >> I think Roger's suggestion is for a different JBS issue / PR / CSR. > > Yeah, we already added this API to allow implementations to be more > consistent under race condition. So for changing char sequences, this > method's default implement

Re: RFR: 8354464: Additional cleanup setting up native.encoding [v2]

2025-04-16 Thread Roger Riggs
On Wed, 16 Apr 2025 03:24:26 GMT, Stuart Marks wrote: >> Remove the #ifdef MACOSX from platform-independent System.c, which (on Mac) >> sets native.encoding from sprops.encoding or (on non-Mac Unix and Windows) >> sets native.encoding from sprops.sun_jnu_encoding. After this removal, the >> na

Re: RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer [v5]

2025-04-16 Thread Chen Liang
On Wed, 16 Apr 2025 10:41:48 GMT, Alan Bateman wrote: >> Any quick proposals how to rephrase JavaDocs and CSR? As the CSR is already >> reviewed I am a bit reluctant to hold the train for this, as IMHO *masses* >> of classes and interfaces would need such a disclaimer, if we kick-off that >> b

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v10]

2025-04-16 Thread Timofei Pushkin
> If a base class is package-private then its subclasses should have the same > package name and defining class loader, otherwise `IllegalAccessError` is > thrown when linking a subclass. Currently when dumping a static archive > separate `URLClassLoader`s are used for each unregistered classes'

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v9]

2025-04-16 Thread Timofei Pushkin
> If a base class is package-private then its subclasses should have the same > package name and defining class loader, otherwise `IllegalAccessError` is > thrown when linking a subclass. Currently when dumping a static archive > separate `URLClassLoader`s are used for each unregistered classes'

Withdrawn: 8347814: Make all imports consistent in the FFM API tests and benchmarks

2025-04-16 Thread duke
On Wed, 19 Feb 2025 09:22:09 GMT, Per Minborg wrote: > This PR proposes to make all imports consistent in the FFM API tests and > benchmarks. > > This is a follow-up PR from https://github.com/openjdk/jdk/pull/22827 > > Passes tier1-3 This pull request has been closed without being integrated

Re: RFR: 8354084: Streamline XPath API's extension function control [v3]

2025-04-16 Thread Roger Riggs
On Mon, 14 Apr 2025 21:00:22 GMT, Joe Wang wrote: >> Streamline the extension function control in the XPath API by relying solely >> on >> [XPathFunctionResolver](https://docs.oracle.com/en/java/javase/24/docs/api/java.xml/javax/xml/xpath/XPathFunctionResolver.html), >> which provides a secure

Re: RFR: 8301971: Make JDK source code UTF-8 [v3]

2025-04-16 Thread Magnus Ihse Bursie
On Wed, 16 Apr 2025 10:35:02 GMT, Matthias Baesken wrote: >> Magnus Ihse Bursie has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Also document UTF-8 requirements (solves JDK-8338973) >> - Let configure only accept utf-8 locales >> -

Re: RFR: 8354464: Additional cleanup setting up native.encoding [v2]

2025-04-16 Thread Alan Bateman
On Wed, 16 Apr 2025 03:24:26 GMT, Stuart Marks wrote: >> Remove the #ifdef MACOSX from platform-independent System.c, which (on Mac) >> sets native.encoding from sprops.encoding or (on non-Mac Unix and Windows) >> sets native.encoding from sprops.sun_jnu_encoding. After this removal, the >> na

Re: RFR: 8354424: java/util/logging/LoggingDeadlock5.java fails intermittently in tier6

2025-04-16 Thread Daniel Fuchs
On Wed, 16 Apr 2025 12:12:14 GMT, David Beaumont wrote: > Increasing timeout for deadlock detection and adjusting for the timeout > factor in higher tiers. Hard to tell whether 1s would be enough. I'd be tempted to bump that up. You should also take the test out of the problem list. --

RFR: 8354424: java/util/logging/LoggingDeadlock5.java fails intermittently in tier6

2025-04-16 Thread David Beaumont
Increasing timeout for deadlock detection and adjusting for the timeout factor in higher tiers. - Commit messages: - Increasing timeout for deadlock detection. Changes: https://git.openjdk.org/jdk/pull/24687/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24687&range=00

Re: RFR: 8352693: Use a simpler console reader instead of JLine for System.console() [v4]

2025-04-16 Thread Jan Lahoda
> The `java.io.Console` has several backends: a simple on in `java.base`, a > more convenient one in `jdk.internal.le` (with line-reading based on JLine) > and one for JShell. > > The backend based on JLine is proving to be a somewhat problematic - JLine is > very powerful, possibly too powerfu

Integrated: Merge ed30fce6df57b1cbf7a6efebabc3558550f8ec16

2025-04-16 Thread Jaikiran Pai
On Wed, 16 Apr 2025 11:20:36 GMT, Jaikiran Pai wrote: > This brings in the CPU25_04 changes into the master branch. This pull request has now been integrated. Changeset: c6243fc2 Author:Jaikiran Pai URL: https://git.openjdk.org/jdk/commit/c6243fc27fafb1ff89f8610ead3acd87030caf95 Sta

Re: Integrated: Merge ed30fce6df57b1cbf7a6efebabc3558550f8ec16

2025-04-16 Thread Jaikiran Pai
On Wed, 16 Apr 2025 11:20:36 GMT, Jaikiran Pai wrote: > This brings in the CPU25_04 changes into the master branch. Thank you Daniel for the review. - PR Comment: https://git.openjdk.org/jdk/pull/24683#issuecomment-2809280611

Re: Integrated: Merge ed30fce6df57b1cbf7a6efebabc3558550f8ec16

2025-04-16 Thread Daniel Fuchs
On Wed, 16 Apr 2025 11:20:36 GMT, Jaikiran Pai wrote: > This brings in the CPU25_04 changes into the master branch. LGTM - Marked as reviewed by dfuchs (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24683#pullrequestreview-2772164693

Integrated: Merge ed30fce6df57b1cbf7a6efebabc3558550f8ec16

2025-04-16 Thread Jaikiran Pai
This brings in the CPU25_04 changes into the master branch. - Commit messages: The merge commit only contains trivial merges, so no merge-specific webrevs have been generated. Changes: https://git.openjdk.org/jdk/pull/24683/files Stats: 0 lines in 0 files changed: 0 ins; 0 del;

Re: RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer [v5]

2025-04-16 Thread Alan Bateman
On Wed, 16 Apr 2025 10:35:10 GMT, Markus KARG wrote: >> src/java.base/share/classes/java/lang/CharSequence.java line 338: >> >>> 336: * Concurrent truncation of this character sequence can throw >>> 337: * {@code IndexOutOfBoundsException}. In this case, some >>> characters, but not >

Re: RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer [v5]

2025-04-16 Thread Markus KARG
On Tue, 15 Apr 2025 20:46:52 GMT, Roger Riggs wrote: >> Markus KARG has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Applied changes requested by Chen: 'We might need to specify the IOOBE >> behavior - when an IOOBE is thrown, some chara

Re: RFR: 8301971: Make JDK source code UTF-8 [v3]

2025-04-16 Thread Matthias Baesken
On Mon, 14 Apr 2025 12:53:35 GMT, Magnus Ihse Bursie wrote: >> Most of the JDK code base has been transitioned to UTF-8, but not all. This >> has recently become an acute problem, since our mixing of iso-8859-1 and >> utf-8 in properties files confused the version of `sed` that is shipped with

Re: RFR: 8354273: Restore even more pointless unicode characters to ASCII [v2]

2025-04-16 Thread Magnus Ihse Bursie
On Wed, 16 Apr 2025 04:39:22 GMT, Phil Race wrote: >> Magnus Ihse Bursie has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Remove incorrectly copied "§anchor" > > src/java.xml/share/legal/xhtml11.md line 50: > >> 48: or derived from [titl

Re: RFR: 8301971: Make JDK source code UTF-8 [v3]

2025-04-16 Thread Magnus Ihse Bursie
On Mon, 14 Apr 2025 12:53:35 GMT, Magnus Ihse Bursie wrote: >> Most of the JDK code base has been transitioned to UTF-8, but not all. This >> has recently become an acute problem, since our mixing of iso-8859-1 and >> utf-8 in properties files confused the version of `sed` that is shipped with

Re: RFR: 8301971: Make JDK source code UTF-8 [v3]

2025-04-16 Thread Martin Doerr
On Wed, 16 Apr 2025 09:51:49 GMT, Magnus Ihse Bursie wrote: > `locale -a` C POSIX en_US.8859-15 en_US.IBM-858 en_US.ISO8859-1 en_US I don't know if UTF-8 can be installed. If so, we should also document that as requirement for AIX build machines. - PR Comment: https://git.openj

Re: RFR: 8301971: Make JDK source code UTF-8 [v3]

2025-04-16 Thread Magnus Ihse Bursie
On Wed, 16 Apr 2025 07:54:13 GMT, Martin Doerr wrote: > We get the following problem on AIX: > > ``` > checking for locale to use... no UTF-8 locale found > configure: error: No UTF-8 locale found. This is required for building > successfully. > configure exiting with result code 1 > ``` This

Re: RFR: 8301971: Make JDK source code UTF-8 [v3]

2025-04-16 Thread Magnus Ihse Bursie
On Tue, 15 Apr 2025 23:20:45 GMT, Sergey Bylokhov wrote: > can we also force this rule by the jcheck? Well, yes and no. First, we can verify that we do not have invalid UTF-8. That might be a signal that the encoding is wrong. But then this check needs to be able to distinguish between pure bi

Re: RFR: 8354450: Using a File with a path containing a trailing space should fail when alternative data streams are disabled (win) [v2]

2025-04-16 Thread Mikhail Yankelevich
On Wed, 16 Apr 2025 00:42:22 GMT, Brian Burkhalter wrote: >> In `java.io.WinNTFileSystem::isInvalid`, replace an insufficient test for >> file path validity with a sufficient test for file path invalidity. Also, >> add a new test. > > Brian Burkhalter has updated the pull request incrementally

RFR: 8351623: VectorAPI: Refactor subword gather load and add SVE implementation

2025-04-16 Thread Xiaohong Gong
### Summary: [JDK-8318650](http://java-service.client.nvidia.com/?q=8318650) added the hotspot intrinsifying of subword gather load APIs for X86 platforms [1]. This patch aims at implementing the equivalent functionality for AArch64 SVE platform. In addition to the AArch64 backend support, this

Integrated: 8354629: Test tools/jlink/ClassFileInMetaInfo.java fails on builds with configure option --enable-linkable-runtime

2025-04-16 Thread Severin Gehwolf
On Tue, 15 Apr 2025 13:09:31 GMT, Severin Gehwolf wrote: > Please review this trivial test-only fix. A new test introduced with > [JDK-8353267](https://bugs.openjdk.org/browse/JDK-8353267) runs `jlink` using > the `ToolProvider` API in-process. This is problematic for JEP 493 enabled > builds

Re: RFR: 8342486: Implement JEP 505: Structured Concurrency (Fifth Preview) [v9]

2025-04-16 Thread Alan Bateman
> Changes for [JEP 505: Structured Concurrency (Fifth > Preview)](https://openjdk.org/jeps/8340343). The proposal is to re-preview > the API with some changes, specifically: > > - A > [StructuredTaskScope](https://download.java.net/java/early_access/loom/docs/api/java.base/java/util/concurrent/

Re: RFR: 8301971: Make JDK source code UTF-8 [v3]

2025-04-16 Thread Martin Doerr
On Mon, 14 Apr 2025 12:53:35 GMT, Magnus Ihse Bursie wrote: >> Most of the JDK code base has been transitioned to UTF-8, but not all. This >> has recently become an acute problem, since our mixing of iso-8859-1 and >> utf-8 in properties files confused the version of `sed` that is shipped with

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v8]

2025-04-16 Thread Timofei Pushkin
On Tue, 15 Apr 2025 17:59:41 GMT, Calvin Cheung wrote: >> Timofei Pushkin has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Remove unused imports > > src/java.base/share/classes/jdk/internal/misc/CDS.java line 390: > >> 388: @

Re: RFR: 8354450: Using a File with a path containing a trailing space should fail when alternative data streams are disabled (win) [v2]

2025-04-16 Thread Alan Bateman
On Wed, 16 Apr 2025 00:42:22 GMT, Brian Burkhalter wrote: >> In `java.io.WinNTFileSystem::isInvalid`, replace an insufficient test for >> file path validity with a sufficient test for file path invalidity. Also, >> add a new test. > > Brian Burkhalter has updated the pull request incrementally

Re: RFR: 8354300: Fields in String are not trusted

2025-04-16 Thread Per Minborg
On Mon, 14 Apr 2025 14:47:59 GMT, Per Minborg wrote: > This PR proposes to add the `@Stable` annotation to `j.l.String.hash` and > `j.l.String.hashIsZero`. This means the VM can trust these fields to never > change which enables constant folding optimizations. > > This PR is tested in tier1, t

Re: RFR: 8354300: Fields in String are not trusted

2025-04-16 Thread Per Minborg
On Wed, 16 Apr 2025 05:38:59 GMT, Chen Liang wrote: >> yes ! I would write >> "given the current implementation of hashCode(), marking hasIsZero @Stable >> is not useful for constant folding, as the field `hash` of value '0' is read >> first." > > Yep. To be more exact, JIT anticipates a read o

  1   2   >