Re: RFR: 8314480: Memory ordering spec updates in java.lang.ref [v15]

2024-03-21 Thread Hans Boehm
Is it worth keeping the discussion starting with "It is sometimes possible to better encapsulate ..." and the associated example code? I find this example extremely unconvincing. It's very hard to construct a case in which you can safely use the result of getExternalResource(). And I don't want to

Re: RFR: 8320396: Class-File API ClassModel::verify should include checks from hotspot/share/classfile/classFileParser.cpp [v2]

2024-03-21 Thread Chen Liang
On Fri, 22 Mar 2024 02:23:56 GMT, David Holmes wrote: > So I'm not clear at what point you would run these JVMS defined structural > verification checks that you are adding? This is more like an addon module to Class-File API; it is only run when users call `ClassFile::verify`. Otherwise, Clas

Re: RFR: 8320396: Class-File API ClassModel::verify should include checks from hotspot/share/classfile/classFileParser.cpp [v2]

2024-03-21 Thread David Holmes
On Thu, 21 Mar 2024 14:40:37 GMT, Adam Sotona wrote: >> ClassFile API `jdk.internal.classfile.verifier.VerifierImpl` performed only >> bytecode-level class verification. >> This patch adds `jdk.internal.classfile.verifier.ParserVerifier` with >> additional class checks inspired by >> `hotspot/

Re: RFR: 8320396: Class-File API ClassModel::verify should include checks from hotspot/share/classfile/classFileParser.cpp [v2]

2024-03-21 Thread David Holmes
On Thu, 21 Mar 2024 14:40:37 GMT, Adam Sotona wrote: >> ClassFile API `jdk.internal.classfile.verifier.VerifierImpl` performed only >> bytecode-level class verification. >> This patch adds `jdk.internal.classfile.verifier.ParserVerifier` with >> additional class checks inspired by >> `hotspot/

Re: RFR: 8320396: Class-File API ClassModel::verify should include checks from hotspot/share/classfile/classFileParser.cpp [v2]

2024-03-21 Thread David Holmes
On Thu, 21 Mar 2024 14:40:37 GMT, Adam Sotona wrote: >> ClassFile API `jdk.internal.classfile.verifier.VerifierImpl` performed only >> bytecode-level class verification. >> This patch adds `jdk.internal.classfile.verifier.ParserVerifier` with >> additional class checks inspired by >> `hotspot/

Re: RFR: 8314480: Memory ordering spec updates in java.lang.ref [v15]

2024-03-21 Thread David Holmes
On Thu, 21 Mar 2024 23:38:30 GMT, Brent Christian wrote: >> Classes in the `java.lang.ref` package would benefit from an update to bring >> the spec in line with how the VM already behaves. The changes would focus on >> _happens-before_ edges at some key points during reference processing. >>

Re: RFR: 8327858: Improve spliterator and forEach for single-element immutable collections [v2]

2024-03-21 Thread Chen Liang
On Thu, 21 Mar 2024 20:09:23 GMT, Viktor Klang wrote: >> Chen Liang has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 13 commits: >> >> - Use the improved form in forEach >> - Merge branch 'master' of https://github.com/openjdk/jd

Re: RFR: 8314480: Memory ordering spec updates in java.lang.ref [v15]

2024-03-21 Thread Brent Christian
> Classes in the `java.lang.ref` package would benefit from an update to bring > the spec in line with how the VM already behaves. The changes would focus on > _happens-before_ edges at some key points during reference processing. > > A couple key things we want to be able to say are: > - `Refer

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v4]

2024-03-21 Thread Maurizio Cimadamore
On Thu, 21 Mar 2024 22:04:28 GMT, Maurizio Cimadamore wrote: > (I'm pessimistic) To summarize: I think that allowing version-specific names (even if surrounded by parenthesis) in `System::loadLibrary` would be very odd. After all, `System::loadLibrary` doesn't support versioned names, even on

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v4]

2024-03-21 Thread Maurizio Cimadamore
On Mon, 18 Mar 2024 17:43:45 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has updated the pull request incremen

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v4]

2024-03-21 Thread Mandy Chung
On Mon, 18 Mar 2024 17:43:45 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has updated the pull request incremen

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v4]

2024-03-21 Thread Mandy Chung
On Mon, 18 Mar 2024 17:43:45 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has updated the pull request incremen

Re: RFR: 8327858: Improve spliterator and forEach for single-element immutable collections [v2]

2024-03-21 Thread Viktor Klang
On Thu, 21 Mar 2024 18:01:38 GMT, Chen Liang wrote: >> Please review this patch that: >> 1. Implemented `forEach` to optimize for 1 or 2 element collections. >> 2. Implemented `spliterator` to optimize for a single element. >> >> The default implementations for multiple-element immutable collect

Re: RFR: 8327858: Improve spliterator and forEach for single-element immutable collections [v2]

2024-03-21 Thread Chen Liang
On Tue, 12 Mar 2024 10:12:18 GMT, Viktor Klang wrote: >> Chen Liang has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 13 commits: >> >> - Use the improved form in forEach >> - Merge branch 'master' of https://github.com/openjdk/jd

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v4]

2024-03-21 Thread Jorn Vernee
On Mon, 18 Mar 2024 17:43:45 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has updated the pull request incremen

Integrated: 8328316: Finisher cannot emit if stream is sequential and integrator returned false

2024-03-21 Thread Viktor Klang
On Mon, 18 Mar 2024 16:27:13 GMT, Viktor Klang wrote: > Adds differentiation between direct and transitive short circuiting which > could prevent pushing downstream in the finisher for built-ins that were not > `collect()`. > > Creating this as a draft PR for now, just need to run some benchma

Re: RFR: JDK-8327640: Allow NumberFormat strict parsing [v3]

2024-03-21 Thread Justin Lu
> Please review this PR and associated > [CSR](https://bugs.openjdk.org/browse/JDK-8327703) which introduces strict > parsing for NumberFormat. > > The concrete subclasses that will utilize this leniency value are > `DecimalFormat` and `CompactNumberFormat`. Strict leniency allows for parsing

Re: RFR: JDK-8327640: Allow NumberFormat strict parsing [v2]

2024-03-21 Thread Justin Lu
On Tue, 19 Mar 2024 08:56:46 GMT, Andrey Turbanov wrote: >> Justin Lu has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Replace protected field with a public getter -> isStrict(). >> Replace setLenient() with setStrict() to avoid messy i

Re: RFR: 8327858: Improve spliterator and forEach for single-element immutable collections [v2]

2024-03-21 Thread Chen Liang
> Please review this patch that: > 1. Implemented `forEach` to optimize for 1 or 2 element collections. > 2. Implemented `spliterator` to optimize for a single element. > > The default implementations for multiple-element immutable collections are > fine as-is, specializing implementation doesn't

Re: RFR: JDK-8327474 Review use of java.io.tmpdir in jdk tests [v3]

2024-03-21 Thread Sean Mullan
On Thu, 21 Mar 2024 17:13:46 GMT, Bill Huang wrote: >> This task addresses an essential aspect of our testing infrastructure: the >> proper handling and cleanup of temporary files and socket files created >> during test execution. The motivation behind these changes is to prevent the >> accumu

Re: RFR: 8325579: Inconsistent behavior in com.sun.jndi.ldap.Connection::createSocket [v9]

2024-03-21 Thread Aleksei Efimov
On Wed, 20 Mar 2024 21:19:38 GMT, Christoph Langer wrote: >> During analysing a customer case I figured out that we have an inconsistency >> between documentation and actual behavior in class >> com.sun.jndi.ldap.Connection. The [method documentation of >> com.sun.jndi.ldap.Connection::createS

Re: RFR: JDK-8327474 Review use of java.io.tmpdir in jdk tests [v3]

2024-03-21 Thread Bill Huang
> This task addresses an essential aspect of our testing infrastructure: the > proper handling and cleanup of temporary files and socket files created > during test execution. The motivation behind these changes is to prevent the > accumulation of unnecessary files in the default temporary direc

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v2]

2024-03-21 Thread Jaikiran Pai
On Thu, 21 Mar 2024 16:57:46 GMT, Jaikiran Pai wrote: > For AIX too then, perhaps you could add an implementation which returns false > (either always or in specific cases) and experiment with that to see if > that's enough? I see that you actually have a ClassLoaderHelper in this PR for AIX,

Re: RFR: 8328316: Finisher cannot emit if stream is sequential and integrator returned false [v5]

2024-03-21 Thread Viktor Klang
> Adds differentiation between direct and transitive short circuiting which > could prevent pushing downstream in the finisher for built-ins that were not > `collect()`. > > Creating this as a draft PR for now, just need to run some benchmarks to > validate no significant regressions first. Vi

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v2]

2024-03-21 Thread Jaikiran Pai
On Thu, 21 Mar 2024 16:11:16 GMT, Suchismith Roy wrote: >>> Hello @suchismith1993, I haven't fully caught up on the necessity of this >>> change. The current proposed change, renames files in the underlying >>> filesystem in the code flow of `System.loadLibrary()` and I don't think is >>> the

Re: RFR: JDK-8327474 Review use of java.io.tmpdir in jdk tests [v2]

2024-03-21 Thread Bill Huang
On Thu, 21 Mar 2024 15:06:58 GMT, Jaikiran Pai wrote: >> Bill Huang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Implemented review comments > > test/jdk/java/util/zip/ZipFile/ZeroDate.java line 95: > >> 93: >> 94: // ensure

Re: RFR: JDK-8327474 Review use of java.io.tmpdir in jdk tests [v2]

2024-03-21 Thread Bill Huang
On Thu, 21 Mar 2024 14:41:36 GMT, Jaikiran Pai wrote: >> Bill Huang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Implemented review comments > > test/jdk/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java line 57: > >> 55:

Re: RFR: JDK-8326853 Missing @since tags for Charset related methods added in Java 10 [v8]

2024-03-21 Thread Justin Lu
On Tue, 19 Mar 2024 17:59:48 GMT, Nizar Benalla wrote: >> Nizar Benalla has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - update the copyright year to 2024 >> - Revert "update the latter years for the Oracle copyrights" >> >>Thi

Re: RFR: 8328316: Finisher cannot emit if stream is sequential and integrator returned false [v4]

2024-03-21 Thread Paul Sandoz
On Wed, 20 Mar 2024 23:58:32 GMT, Viktor Klang wrote: >> Adds differentiation between direct and transitive short circuiting which >> could prevent pushing downstream in the finisher for built-ins that were not >> `collect()`. >> >> Creating this as a draft PR for now, just need to run some be

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v2]

2024-03-21 Thread Suchismith Roy
On Thu, 21 Mar 2024 15:51:59 GMT, Suchismith Roy wrote: >>> Do you mean some application code is calling the `System.loadLibrary()` >>> method with such values? >> >> Yes we are trying to install liblcang and also jextract and it fails with >> errors. >> >> Exception in thread "main" java.lan

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v2]

2024-03-21 Thread Suchismith Roy
On Tue, 19 Mar 2024 10:01:31 GMT, Suchismith Roy wrote: >>> > In AIX, we have an usecase where shared libraries have certain member >>> > objects to be referred to. E.g libclang.a(shr_64.o) . >>> >>> Would you happen to know any official documentation which explains that AIX >>> syntax? >>> >

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v2]

2024-03-21 Thread Martin Doerr
On Thu, 21 Mar 2024 15:22:22 GMT, Jaikiran Pai wrote: >> Hello @suchismith1993, I haven't fully caught up on the necessity of this >> change. The current proposed change, renames files in the underlying >> filesystem in the code flow of `System.loadLibrary()` and I don't think is >> the right

Re: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v23]

2024-03-21 Thread Severin Gehwolf
On Thu, 21 Mar 2024 15:28:23 GMT, Magnus Ihse Bursie wrote: >>> First question, do this class really need to be in a separate module? (I'm >>> afraid the answer is "yes" but I need to ask it anyway). >> >> Yes, because it uses the `Plugin` ServiceLoader extension using the boot >> ModuleLayer.

Re: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v23]

2024-03-21 Thread Magnus Ihse Bursie
On Thu, 21 Mar 2024 15:27:06 GMT, Severin Gehwolf wrote: >> make/Images.gmk line 131: >> >>> 129: # in FixPath call in order to avoid needing to use strip. >>> 130: RL_JIMAGE_PATH_ARG := $(call >>> FixPath,$(JDK_LINK_OUTPUT_DIR)/lib/modules) >>> 131: RL_MOD_PATH_ARG := $(call FixPath,$(IM

Re: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v23]

2024-03-21 Thread Severin Gehwolf
On Thu, 21 Mar 2024 14:54:15 GMT, Magnus Ihse Bursie wrote: >> Severin Gehwolf has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Move CreateLinkableRuntimePlugin to build folder >> >> Keep runtime link supporting classes in package >>

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v2]

2024-03-21 Thread Jaikiran Pai
On Thu, 21 Mar 2024 15:18:15 GMT, Jaikiran Pai wrote: >>> Do you mean some application code is calling the `System.loadLibrary()` >>> method with such values? >> >> Yes we are trying to install liblcang and also jextract and it fails with >> errors. >> >> Exception in thread "main" java.lang.

Re: RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v2]

2024-03-21 Thread Jaikiran Pai
On Tue, 19 Mar 2024 10:01:31 GMT, Suchismith Roy wrote: >>> > In AIX, we have an usecase where shared libraries have certain member >>> > objects to be referred to. E.g libclang.a(shr_64.o) . >>> >>> Would you happen to know any official documentation which explains that AIX >>> syntax? >>> >

Re: RFR: JDK-8327474 Review use of java.io.tmpdir in jdk tests [v2]

2024-03-21 Thread Jaikiran Pai
On Tue, 19 Mar 2024 17:58:46 GMT, Bill Huang wrote: >> This task addresses an essential aspect of our testing infrastructure: the >> proper handling and cleanup of temporary files and socket files created >> during test execution. The motivation behind these changes is to prevent the >> accumu

Re: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v23]

2024-03-21 Thread Magnus Ihse Bursie
On Tue, 19 Mar 2024 16:55:14 GMT, Severin Gehwolf wrote: >> Please review this patch which adds a jlink mode to the JDK which doesn't >> need the packaged modules being present. A.k.a run-time image based jlink. >> Fundamentally this patch adds an option to use `jlink` even though your JDK >>

Re: RFR: JDK-8327474 Review use of java.io.tmpdir in jdk tests [v2]

2024-03-21 Thread Jaikiran Pai
On Tue, 19 Mar 2024 17:58:46 GMT, Bill Huang wrote: >> This task addresses an essential aspect of our testing infrastructure: the >> proper handling and cleanup of temporary files and socket files created >> during test execution. The motivation behind these changes is to prevent the >> accumu

Re: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v23]

2024-03-21 Thread Magnus Ihse Bursie
On Tue, 19 Mar 2024 16:55:14 GMT, Severin Gehwolf wrote: >> Please review this patch which adds a jlink mode to the JDK which doesn't >> need the packaged modules being present. A.k.a run-time image based jlink. >> Fundamentally this patch adds an option to use `jlink` even though your JDK >>

Re: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v23]

2024-03-21 Thread Magnus Ihse Bursie
On Tue, 19 Mar 2024 16:55:14 GMT, Severin Gehwolf wrote: >> Please review this patch which adds a jlink mode to the JDK which doesn't >> need the packaged modules being present. A.k.a run-time image based jlink. >> Fundamentally this patch adds an option to use `jlink` even though your JDK >>

Re: RFR: JDK-8327474 Review use of java.io.tmpdir in jdk tests [v2]

2024-03-21 Thread Jaikiran Pai
On Tue, 19 Mar 2024 17:58:46 GMT, Bill Huang wrote: >> This task addresses an essential aspect of our testing infrastructure: the >> proper handling and cleanup of temporary files and socket files created >> during test execution. The motivation behind these changes is to prevent the >> accumu

Re: RFR: 8320396: Class-File API ClassModel::verify should include checks from hotspot/share/classfile/classFileParser.cpp [v2]

2024-03-21 Thread Adam Sotona
> ClassFile API `jdk.internal.classfile.verifier.VerifierImpl` performed only > bytecode-level class verification. > This patch adds `jdk.internal.classfile.verifier.ParserVerifier` with > additional class checks inspired by > `hotspot/share/classfile/classFileParser.cpp`. > > Also new `Verifie

RFR: 8320396: Class-File API ClassModel::verify should include checks from hotspot/share/classfile/classFileParser.cpp

2024-03-21 Thread Adam Sotona
ClassFile API `jdk.internal.classfile.verifier.VerifierImpl` performed only bytecode-level class verification. This patch adds `jdk.internal.classfile.verifier.ParserVerifier` with additional class checks inspired by `hotspot/share/classfile/classFileParser.cpp`. Also new `VerifierSelfTest::tes

Integrated: 8327994: Update code gen in CallGeneratorHelper

2024-03-21 Thread Jorn Vernee
On Wed, 13 Mar 2024 11:28:27 GMT, Jorn Vernee wrote: > Update the code gen code in CallGeneratorHelper to reflect the latest state > of the libTest(Downcall/Upcall)(Stack).c and shared.h files. > > - The previous code wanted users to pipe stdout into a file. But, since we > have 5 files that n

Re: RFR: 8323552: AbstractMemorySegmentImpl#mismatch returns -1 when comparing distinct areas of the same instance of MemorySegment

2024-03-21 Thread Maurizio Cimadamore
On Thu, 21 Mar 2024 09:23:45 GMT, Per Minborg wrote: > This PR proposes to remove an old optimization check that was incorrect > making `AbstractMemorySegmentImpl::mismatch` always return `-1` if the source > and destination segment are the same (disregarding offsets). Marked as reviewed by mc

Re: RFR: 8325579: Inconsistent behavior in com.sun.jndi.ldap.Connection::createSocket [v9]

2024-03-21 Thread Daniel Fuchs
On Wed, 20 Mar 2024 21:19:38 GMT, Christoph Langer wrote: >> During analysing a customer case I figured out that we have an inconsistency >> between documentation and actual behavior in class >> com.sun.jndi.ldap.Connection. The [method documentation of >> com.sun.jndi.ldap.Connection::createS

RFR: 8323552: AbstractMemorySegmentImpl#mismatch returns -1 when comparing distinct areas of the same instance of MemorySegment

2024-03-21 Thread Per Minborg
This PR proposes to remove an old optimization check that was incorrect making `AbstractMemorySegmentImpl::mismatch` always return `-1` if the source and destination segment are the same (disregarding offsets). - Commit messages: - Remove comment out markings - Remove erroneous ch

Withdrawn: 8327176: UnreferencedExecutor.java can fail on libgraal with -Xcomp

2024-03-21 Thread Doug Simon
On Sun, 3 Mar 2024 17:01:53 GMT, Doug Simon wrote: > The `java/util/concurrent/Executors/UnreferencedExecutor.java` test can fail > when run on libgraal and `-Xcomp` is specified. The problem is that libgraal > in `-Xcomp` temporarily causes some extra memory pressure (probably due to > [JDK-8

Re: RFR: 8327176: UnreferencedExecutor.java can fail on libgraal with -Xcomp

2024-03-21 Thread Doug Simon
On Sun, 3 Mar 2024 17:03:51 GMT, Doug Simon wrote: >> The `java/util/concurrent/Executors/UnreferencedExecutor.java` test can fail >> when run on libgraal and `-Xcomp` is specified. The problem is that libgraal >> in `-Xcomp` temporarily causes some extra memory pressure (probably due to >> [J

Re: RFR: 8327176: UnreferencedExecutor.java can fail on libgraal with -Xcomp

2024-03-21 Thread Alan Bateman
On Sun, 3 Mar 2024 17:03:51 GMT, Doug Simon wrote: >> The `java/util/concurrent/Executors/UnreferencedExecutor.java` test can fail >> when run on libgraal and `-Xcomp` is specified. The problem is that libgraal >> in `-Xcomp` temporarily causes some extra memory pressure (probably due to >> [J