Re: RFR: 8306889: Convert MethodTypeDescImpl parameter storage from array to immutable list [v4]

2023-05-23 Thread Chen Liang
On Wed, 24 May 2023 02:29:09 GMT, Chen Liang wrote: >> This patch moves the parameters to an immutable list, to avoid allocations >> on `parameterList` as well. In addition, it fixes 8304932, the bug where if >> a caller keeps a reference to the array passed into `MethodTypeDesc.of`, the >>

Re: RFR: 8306889: Convert MethodTypeDescImpl parameter storage from array to immutable list [v4]

2023-05-23 Thread Chen Liang
> This patch moves the parameters to an immutable list, to avoid allocations on > `parameterList` as well. In addition, it fixes 8304932, the bug where if a > caller keeps a reference to the array passed into `MethodTypeDesc.of`, the > caller may mutate the Desc via the array and can create

Re: RFR: 8174722: Wrong behavior of DecimalFormat with RoundingMode.UP in special case

2023-05-23 Thread Justin Lu
On Tue, 23 May 2023 23:30:11 GMT, Joe Darcy wrote: > Note there are some hazards here with respect to the numerical values of > double and the decimal string used to represent the double; in exact terms: > > ``` > jshell> new BigDecimal(1.0001) > $2 ==>

Re: RFR: 8174722: Wrong behavior of DecimalFormat with RoundingMode.UP in special case

2023-05-23 Thread Joe Darcy
On Tue, 23 May 2023 23:16:01 GMT, Justin Lu wrote: > Please review this PR, which addresses a case where Decimal Format would > violate certain RoundingMode contracts given the right pattern and double. > > For example, > > > DecimalFormat df = new DecimalFormat(); >

RFR: 8174722: Wrong behavior of DecimalFormat with RoundingMode.UP in special case

2023-05-23 Thread Justin Lu
Please review this PR, which addresses a case where Decimal Format would violate certain RoundingMode contracts given the right pattern and double. For example, DecimalFormat df = new DecimalFormat(); df.setRoundingMode(RoundingMode.UP); double small = 0.0001; double big = 1.0001;

Re: RFR: 8308293: A linker should expose the layouts it supports [v4]

2023-05-23 Thread Paul Sandoz
On Tue, 23 May 2023 20:32:10 GMT, Maurizio Cimadamore wrote: > Effectively, what you suggest amount at saying: we do have a JAVA_CHAR > layout, which is mostly there for Java interop. But a native linker (which > only cares about native interop) doesn't really care much about that. Does >

RFR: 8290499: new File(parent, \"/\") breaks normalization – creates File with slash at the end

2023-05-23 Thread Brian Burkhalter
In `java.io.File`, change the constructors `File(File,String)` and `File(String,String)` so that they do not for typical cases return a `File` whose path has a trailing name separator. - Commit messages: - 8290499: new File(parent, \"/\") breaks normalization – creates File with

Re: Classes used in method body are loaded lazily or eagerly depending on method return type

2023-05-23 Thread Remi Forax
- Original Message - > From: "David Holmes" > To: "Raffaello Giulietti" , "core-libs-dev" > > Sent: Wednesday, May 24, 2023 12:23:24 AM > Subject: Re: Classes used in method body are loaded lazily or eagerly > depending on method return type > On 24/05/2023 12:50 am, Raffaello

Re: Classes used in method body are loaded lazily or eagerly depending on method return type

2023-05-23 Thread Remi Forax
- Original Message - > From: "Сергей Цыпанов" > To: "core-libs-dev" > Sent: Tuesday, May 23, 2023 1:20:44 PM > Subject: Classes used in method body are loaded lazily or eagerly depending > on method return type > Hello, Hello, > > originally this question was asked here: >

Re: Classes used in method body are loaded lazily or eagerly depending on method return type

2023-05-23 Thread David Holmes
On 24/05/2023 12:50 am, Raffaello Giulietti wrote: I think the problem here is that you are deleting a class in a nest. During the verification of BaseClassReturner.getObject(), access control (JVMS, 5.4.4, second half) determines that the nest is broken, as ChildClass is not present anymore.

Re: Classes used in method body are loaded lazily or eagerly depending on method return type

2023-05-23 Thread David Holmes
On 24/05/2023 5:04 am, Сергей Цыпанов wrote: Hi, Verification can require classes to be loaded to perform the verification - see JVMS 4.10 for all the details. sorry, I still don't get it completely. Here's the byte code for ObjectReturner.getObject(): // access flags 0x1 public

Integrated: 8306698: Add overloads to MethodTypeDesc::of

2023-05-23 Thread Chen Liang
On Sat, 22 Apr 2023 16:31:31 GMT, Chen Liang wrote: > Please review this patch adding two new convenience methods that allows > easier access to MethodTypeDesc instances and its associated CSR as well. > This is a necessity to allow #13186 to reduce array copies in a few > scenarios; the

Re: RFR: JDK-8306584: Start of release updates for JDK 22

2023-05-23 Thread Iris Clark
On Thu, 20 Apr 2023 20:28:18 GMT, Joe Darcy wrote: > Time to get JDK 22 underway... Marked as reviewed by iris (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/13567#pullrequestreview-1440582657

Re: RFR: 8308293: A linker should expose the layouts it supports [v4]

2023-05-23 Thread Maurizio Cimadamore
On Tue, 23 May 2023 20:32:10 GMT, Maurizio Cimadamore wrote: > Arguably C `unsigned short` could map to carriers Java `short` or Java > `char`, but i am inclined to say the user should cast between Java `short` to > `char` in such cases. (Another advantage of this is that, should we get

Re: RFR: JDK-8306584: Start of release updates for JDK 22

2023-05-23 Thread Joe Darcy
On Tue, 23 May 2023 20:38:34 GMT, Jonathan Gibbons wrote: >> Time to get JDK 22 underway... > > test/langtools/tools/javac/versions/Versions.java line 93: > >> 91: TWENTY(false,"64.0", "20", Versions::checksrc20), >> 92: TWENTY_ONE(false,"65.0", "21", Versions::checksrc20),

Re: RFR: 8306698: Add overloads to MethodTypeDesc::of [v2]

2023-05-23 Thread Mandy Chung
On Sun, 23 Apr 2023 23:44:41 GMT, Chen Liang wrote: >> Please review this patch adding two new convenience methods that allows >> easier access to MethodTypeDesc instances and its associated CSR as well. >> This is a necessity to allow #13186 to reduce array copies in a few >> scenarios; the

Re: RFR: JDK-8306584: Start of release updates for JDK 22

2023-05-23 Thread Erik Joelsson
On Thu, 20 Apr 2023 20:28:18 GMT, Joe Darcy wrote: > Time to get JDK 22 underway... Marked as reviewed by erikj (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/13567#pullrequestreview-1440532444

Re: RFR: JDK-8306584: Start of release updates for JDK 22

2023-05-23 Thread Jonathan Gibbons
On Thu, 20 Apr 2023 20:28:18 GMT, Joe Darcy wrote: > Time to get JDK 22 underway... test/langtools/tools/javac/versions/Versions.java line 26: > 24: /* > 25: * @test > 26: * @bug 4981566 5028634 5094412 6304984 7025786 7025789 8001112 8028545 > 8000961 8030610 8028546 8188870 8173382

Re: RFR: JDK-8306584: Start of release updates for JDK 22

2023-05-23 Thread Joe Darcy
On Thu, 20 Apr 2023 20:28:18 GMT, Joe Darcy wrote: > Time to get JDK 22 underway... Typical start-of-JDK-next changes. As usual, the bulk of the PR is the symbol file information to support "javac --release 21". - PR Comment:

RFR: JDK-8306584: Start of release updates for JDK 22

2023-05-23 Thread Joe Darcy
Time to get JDK 22 underway... - Commit messages: - Merge branch 'master' into JDK-8306584 - Merge branch 'master' into JDK-8306584 - Minor test fixes. - Merge branch 'master' into JDK-8306584 - Update symbol files to JDK 21 b23. - Merge branch 'JDK-8306584' of

Re: RFR: 8308293: A linker should expose the layouts it supports [v4]

2023-05-23 Thread Maurizio Cimadamore
On Mon, 22 May 2023 09:34:53 GMT, Maurizio Cimadamore wrote: >> This patch adds an instance method on `Linker`, namely >> `Linker::canonicalLayouts` which returns all the layouts known by the linker >> as implementing some ABI type. For instance, if I call this on my machine >> (Linux/x64) I

Re: RFR: 8306698: Add overloads to MethodTypeDesc::of [v2]

2023-05-23 Thread Chen Liang
On Sun, 23 Apr 2023 23:44:41 GMT, Chen Liang wrote: >> Please review this patch adding two new convenience methods that allows >> easier access to MethodTypeDesc instances and its associated CSR as well. >> This is a necessity to allow #13186 to reduce array copies in a few >> scenarios; the

Re: RFR: 8306698: Add overloads to MethodTypeDesc::of [v2]

2023-05-23 Thread Chen Liang
On Tue, 23 May 2023 20:03:35 GMT, Mandy Chung wrote: > yes, I'm back from vacation. > > This change looks fine. Can you update the copyright header to 2023? The copyright year was already updated to 2023 when covariant override for `resolveConstantDesc` was added. - PR Comment:

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v36]

2023-05-23 Thread Martin Doerr
On Tue, 23 May 2023 15:21:02 GMT, Martin Doerr wrote: >> Implementation of "Foreign Function & Memory API" for linux on Power (Little >> Endian) according to "Power Architecture 64-Bit ELF V2 ABI Specification". >> >> This PR does not include code for VaList support because it's supposed to

Re: RFR: 8306698: Add overloads to MethodTypeDesc::of [v2]

2023-05-23 Thread Mandy Chung
On Sun, 23 Apr 2023 23:44:41 GMT, Chen Liang wrote: >> Please review this patch adding two new convenience methods that allows >> easier access to MethodTypeDesc instances and its associated CSR as well. >> This is a necessity to allow #13186 to reduce array copies in a few >> scenarios; the

Re: RFR: 8306698: Add overloads to MethodTypeDesc::of [v2]

2023-05-23 Thread Mandy Chung
On Sun, 23 Apr 2023 23:44:41 GMT, Chen Liang wrote: >> Please review this patch adding two new convenience methods that allows >> easier access to MethodTypeDesc instances and its associated CSR as well. >> This is a necessity to allow #13186 to reduce array copies in a few >> scenarios; the

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v17]

2023-05-23 Thread Jim Laskey
> Add flexible main methods and anonymous main classes to the Java language. Jim Laskey has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 33 commits: - Fix missing constructor error messages and handle inner class launching - Merge

Re: EnumSet doesn't implement SequencedSet

2023-05-23 Thread Aaron Scott-Boddendijk
> It doesn't seem like the members of an EnumSet would be iterated frequently... We use EnumSet and EnumMap extensively, frequently iterating over them (the enum's natural order being critical). > ...usually treated as a bag of named booleans used as a set of boolean options. So for us it's...

Re: RFR: 8308549: Classfile API should fail to generate over-sized Code attribute

2023-05-23 Thread Mandy Chung
On Tue, 23 May 2023 12:54:20 GMT, Adam Sotona wrote: > Classfile API allowed to generate Code attribute exceeding the 65k limit. No > exception has been thrown during class generation and the class failed > verification later during class loading. > This patch adds Code size limit check

Re: RFR: 8306647: Implementation of Structured Concurrency (Preview)

2023-05-23 Thread Andrew Haley
On Tue, 23 May 2023 18:23:21 GMT, Paul Sandoz wrote: > Oh, and i guess that has some performance implications in some cases? more so > on the set of instructions produced on ARM say rather than limiting C2 > optimizations? I think so. As far as I can remember, a release fence on x86 generates

Re: RFR: 8306647: Implementation of Structured Concurrency (Preview)

2023-05-23 Thread Paul Sandoz
On Tue, 23 May 2023 14:57:26 GMT, Andrew Haley wrote: >> @theRealAph will want to comment on this as it is very performance >> sensitive. I think CallableAdapter.s is non-final to avoid the release fence. > > That's right. The problem is that we can never get rid of the release fence, >

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v16]

2023-05-23 Thread Jim Laskey
On Tue, 23 May 2023 18:02:16 GMT, Alan Bateman wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Give subclass priority > > src/java.base/share/classes/jdk/internal/misc/MainMethodFinder.java line 129: > >> 127:

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v16]

2023-05-23 Thread Alan Bateman
On Thu, 18 May 2023 19:06:28 GMT, Jim Laskey wrote: >> Add flexible main methods and anonymous main classes to the Java language. > > Jim Laskey has updated the pull request incrementally with one additional > commit since the last revision: > > Give subclass priority

Re: EnumSet doesn't implement SequencedSet

2023-05-23 Thread Stuart Marks
The idea of EnumSet implementing SortedSet or NavigableSet has been around for a long time; see https://bugs.openjdk.org/browse/JDK-6278287 But yes, EnumSet could also implement SequencedSet. Similarly, EnumMap could implement SequencedMap, SortedMap, or NavigableMap. Implementing

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v36]

2023-05-23 Thread Richard Reingruber
On Tue, 23 May 2023 15:21:02 GMT, Martin Doerr wrote: >> Implementation of "Foreign Function & Memory API" for linux on Power (Little >> Endian) according to "Power Architecture 64-Bit ELF V2 ABI Specification". >> >> This PR does not include code for VaList support because it's supposed to

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v35]

2023-05-23 Thread Richard Reingruber
On Tue, 23 May 2023 12:26:52 GMT, Martin Doerr wrote: > I believe omitting the PSA is wrong for varargs, but we don't have this > information in the backend. It is clearly wrong. > So, I think we should simply not optimize it. Already agreed for this version. > Reserving 64 Byte stack space

Re: RFR: 8159023: Engineering notation of DecimalFormat does not work as documented [v3]

2023-05-23 Thread Naoto Sato
On Tue, 23 May 2023 05:31:37 GMT, Justin Lu wrote: >> Please review this PR which updates the Scientific Notation section of >> Decimal Format. It aims to resolve >> [JDK-8159023](https://bugs.openjdk.org/browse/JDK-8159023) as well as >>

Re: RFR: JDK-8282797: CompileCommand parsing errors should exit VM

2023-05-23 Thread Vladimir Kozlov
On Tue, 2 May 2023 11:35:54 GMT, Tobias Holenstein wrote: > Currently, errors during compile command parsing just print an error but > don't exit the VM. As a result, issues go unnoticed. > > With this PR the behavior is changed to exit the VM when an error occurs. > > E.g. `java

Re: RFR: 8300038: Make new version of JNU_GetStringPlatformChars which checks for null characters [v2]

2023-05-23 Thread Naoto Sato
On Tue, 23 May 2023 15:31:49 GMT, Michael McMahon wrote: >> This PR creates a new version of the JNI utility function >> JNU_GetStringPlatformChars called JNU_GetStringPlatformCharsStrict, which >> performs additional validation of the returned string, namely that it does >> not contain any

Integrated: 8308016: Use snippets in java.io package

2023-05-23 Thread Brian Burkhalter
On Fri, 12 May 2023 16:17:38 GMT, Brian Burkhalter wrote: > Replace `{@code ...}` patterns and the like with `{@snippet > lang=java : ...}`. This pull request has now been integrated. Changeset: 710453c6 Author:Brian Burkhalter URL:

RFR: JDK-8282797: CompileCommand parsing errors should exit VM

2023-05-23 Thread Tobias Holenstein
Currently, errors during compile command parsing just print an error but don't exit the VM. As a result, issues go unnoticed. With this PR the behavior is changed to exit the VM when an error occurs. E.g. `java -XX:CompileCommand=compileonly,HashMap:: -version` will exit the VM after a

Re: RFR: 8300038: Make new version of JNU_GetStringPlatformChars which checks for null characters [v2]

2023-05-23 Thread Daniel Fuchs
On Tue, 23 May 2023 15:31:49 GMT, Michael McMahon wrote: >> This PR creates a new version of the JNI utility function >> JNU_GetStringPlatformChars called JNU_GetStringPlatformCharsStrict, which >> performs additional validation of the returned string, namely that it does >> not contain any

Re: RFR: 8306647: Implementation of Structured Concurrency (Preview)

2023-05-23 Thread Andrew Haley
On Mon, 22 May 2023 18:42:02 GMT, Alan Bateman wrote: >> src/java.base/share/classes/java/lang/ScopedValue.java line 399: >> >>> 397: var prevSnapshot = scopedValueBindings(); >>> 398: var newSnapshot = new Snapshot(this, prevSnapshot); >>> 399: return

Re: RFR: 8306647: Implementation of Structured Concurrency (Preview)

2023-05-23 Thread Paul Sandoz
On Thu, 11 May 2023 13:08:55 GMT, Alan Bateman wrote: > This is the implementation of: > > - JEP 453: Structured Concurrency (Preview) > - JEP 446: Scoped Values (Preview) > > For the most part, this is just moving code and tests. StructuredTaskScope > moves to j.u.concurrent as a preview

Re: RFR: 8300038: Make new version of JNU_GetStringPlatformChars which checks for null characters [v2]

2023-05-23 Thread Daniel Fuchs
On Tue, 23 May 2023 15:18:36 GMT, Michael McMahon wrote: >> This PR creates a new version of the JNI utility function >> JNU_GetStringPlatformChars called JNU_GetStringPlatformCharsStrict, which >> performs additional validation of the returned string, namely that it does >> not contain any

Re: RFR: 8306647: Implementation of Structured Concurrency (Preview)

2023-05-23 Thread Alan Bateman
On Sat, 20 May 2023 00:27:23 GMT, Paul Sandoz wrote: >> This is the implementation of: >> >> - JEP 453: Structured Concurrency (Preview) >> - JEP 446: Scoped Values (Preview) >> >> For the most part, this is just moving code and tests. StructuredTaskScope >> moves to j.u.concurrent as a

RFR: 8308645: Javadoc of FFM API needs to be refreshed

2023-05-23 Thread Maurizio Cimadamore
As the FFM API evolved over time, some parts of the javadoc went out of sync. Now that most of the API is stable, it is a good time to look again at the javadoc as a whole, and bring some more consistency. While most of the changes in this PR are stylistic, I'd like to call out few things

Re: RFR: 8300038: Make new version of JNU_GetStringPlatformChars which checks for null characters [v2]

2023-05-23 Thread Michael McMahon
> This PR creates a new version of the JNI utility function > JNU_GetStringPlatformChars called JNU_GetStringPlatformCharsStrict, which > performs additional validation of the returned string, namely that it does > not contain any embedded NULL characters. If any such characters are found >

RFR: 8306647: Implementation of Structured Concurrency (Preview)

2023-05-23 Thread Alan Bateman
This is the implementation of: - JEP 453: Structured Concurrency (Preview) - JEP 446: Scoped Values (Preview) For the most part, this is just moving code and tests. StructuredTaskScope moves to j.u.concurrent as a preview API, ScopedValue moves to j.lang as a preview API, and module

Re: RFR: 8308645: Javadoc of FFM API needs to be refreshed

2023-05-23 Thread Maurizio Cimadamore
On Tue, 23 May 2023 11:48:59 GMT, Maurizio Cimadamore wrote: > As the FFM API evolved over time, some parts of the javadoc went out of sync. > Now that most of the API is stable, it is a good time to look again at the > javadoc as a whole, and bring some more consistency. > > While most of

Re: RFR: 8308549: Classfile API should fail to generate over-sized Code attribute

2023-05-23 Thread Chen Liang
On Tue, 23 May 2023 12:54:20 GMT, Adam Sotona wrote: > Classfile API allowed to generate Code attribute exceeding the 65k limit. No > exception has been thrown during class generation and the class failed > verification later during class loading. > This patch adds Code size limit check

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v35]

2023-05-23 Thread Martin Doerr
On Tue, 23 May 2023 07:46:08 GMT, Richard Reingruber wrote: >> src/hotspot/cpu/ppc/downcallLinker_ppc.cpp line 163: >> >>> 161: // The Parameter Save Area needs to be at least 8 slots for ABIv1. >>> 162: // ABIv2 allows omitting it when all parameters can get passed in >>> registers. We

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v36]

2023-05-23 Thread Martin Doerr
> Implementation of "Foreign Function & Memory API" for linux on Power (Little > Endian) according to "Power Architecture 64-Bit ELF V2 ABI Specification". > > This PR does not include code for VaList support because it's supposed to get > removed by

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it [v5]

2023-05-23 Thread Roger Riggs
On Tue, 23 May 2023 14:21:06 GMT, Volker Simonis wrote: >> Since JDK13, executing commands in a sub-process defaults to the so called >> `POSIX_SPAWN` launching mechanism (i.e. >> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by >> using `posix_spawn(3)` to firstly

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it [v4]

2023-05-23 Thread Volker Simonis
On Tue, 23 May 2023 05:34:15 GMT, Thomas Stuefe wrote: >> Volker Simonis has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains five commits: >> >> - Merge branch 'master' into JDK-8307990 >> - Address comments from tstuefe and

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it [v5]

2023-05-23 Thread Volker Simonis
> Since JDK13, executing commands in a sub-process defaults to the so called > `POSIX_SPAWN` launching mechanism (i.e. > `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by > using `posix_spawn(3)` to firstly start a tiny helper program called > `jspawnhelper` in a

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it

2023-05-23 Thread Volker Simonis
On Fri, 19 May 2023 15:43:30 GMT, Roger Riggs wrote: >>> Sorry, but I don't understand this argument. If we do a short read we will >>> work with corrupted ChildStuff and SpawnInfo >>> structures. This can in the extreme case execute arbitrary code (e.g. if >>> ChildStuff.argv is not fully

RFR: 8300038: Make new version of JNU_GetStringPlatformChars which checks for null characters

2023-05-23 Thread Michael McMahon
This PR creates a new version of the JNI utility function JNU_GetStringPlatformChars called JNU_GetStringPlatformCharsStrict, which performs additional validation of the returned string, namely that it does not contain any embedded NULL characters. If any such characters are found the function

RFR: 8308549: Classfile API should fail to generate over-sized Code attribute

2023-05-23 Thread Adam Sotona
Classfile API allowed to generate Code attribute exceeding the 65k limit. No exception has been thrown during class generation and the class failed verification later during class loading. This patch adds Code size limit check throwing IllegalArgumentException. The patch also adds similar check

Re: RFR: JDK-8298066: java/util/concurrent/locks/Lock/OOMEInAQS.java timed out [v3]

2023-05-23 Thread Alan Bateman
On Tue, 23 May 2023 09:02:27 GMT, Viktor Klang wrote: >> Doubling the max heap size since not all GCs might have compressed OOPs, so >> this change should make this test more robust. >> >> Cleared with @DougLea > > Viktor Klang has updated the pull request with a new target base due to a >

Re: Classes used in method body are loaded lazily or eagerly depending on method return type

2023-05-23 Thread Raffaello Giulietti
I think the problem here is that you are deleting a class in a nest. During the verification of BaseClassReturner.getObject(), access control (JVMS, 5.4.4, second half) determines that the nest is broken, as ChildClass is not present anymore. If you move ChildClass out of TestLoading so that

Re: Classes used in method body are loaded lazily or eagerly depending on method return type

2023-05-23 Thread David Holmes
Hi, On 23/05/2023 9:20 pm, Сергей Цыпанов wrote: Hello, originally this question was asked here: https://stackoverflow.com/q/76260269/12473843, the code sample for reproduction will be put below or can be found via the link The issue is about eager/lazy loading of a class depending on method

Classes used in method body are loaded lazily or eagerly depending on method return type

2023-05-23 Thread Сергей Цыпанов
Hello, originally this question was asked here: https://stackoverflow.com/q/76260269/12473843, the code sample for reproduction will be put below or can be found via the link The issue is about eager/lazy loading of a class depending on method return type. If one runs the code below with Java

Re: EnumSet doesn't implement SequencedSet

2023-05-23 Thread Tagir Valeev
Hello! Looks like this was overlooked. On the other hand, it could even implement SortedSet or Navigable set, as it's essentially not just ordered but sorted, according to the enum natural order. Same for EnumMap. With best regards, Tagir Valeev On Tue, May 23, 2023, 11:46 Andrey Turbanov

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it [v4]

2023-05-23 Thread Thomas Stuefe
On Mon, 22 May 2023 10:22:16 GMT, Volker Simonis wrote: >> Since JDK13, executing commands in a sub-process defaults to the so called >> `POSIX_SPAWN` launching mechanism (i.e. >> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by >> using `posix_spawn(3)` to firstly

Re: RFR: JDK-8027711: Unify wildcarding syntax for CompileCommand and CompileOnly [v2]

2023-05-23 Thread Tobias Holenstein
> At the moment `CompileCommand` and `CompileOnly` use different syntax for > matching methods. > > ### Old CompileOnly format > - matching a **method name** with **class name** and **package name**: > `-XX:CompileOnly=package/path/Class.method` > `-XX:CompileOnly=package/path/Class::method` >

Re: RFR: JDK-8298066: java/util/concurrent/locks/Lock/OOMEInAQS.java timed out [v3]

2023-05-23 Thread Viktor Klang
> Doubling the max heap size since not all GCs might have compressed OOPs, so > this change should make this test more robust. > > Cleared with @DougLea Viktor Klang has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: -

Re: RFR: JDK-8027711: Unify wildcarding syntax for CompileCommand and CompileOnly [v2]

2023-05-23 Thread Tobias Holenstein
On Tue, 23 May 2023 08:01:07 GMT, Christian Hagedorn wrote: >> Tobias Holenstein has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Update Test8211698.java >> - Update src/hotspot/share/compiler/compilerOracle.cpp >> >>

Re: RFR: JDK-8298066: java/util/concurrent/locks/Lock/OOMEInAQS.java timed out [v2]

2023-05-23 Thread Viktor Klang
On Tue, 23 May 2023 08:27:39 GMT, Viktor Klang wrote: >> Doubling the max heap size since not all GCs might have compressed OOPs, so >> this change should make this test more robust. >> >> Cleared with @DougLea > > Viktor Klang has refreshed the contents of this pull request, and previous >

Re: RFR: 8308090: Add container tests for on-the-fly resource quota updates [v2]

2023-05-23 Thread Severin Gehwolf
> Please review these test changes which implement automatic testing of > container resource updates without JVM restart. Note that this merely tests > container detection code handling this case. It doesn't do anything special > for the JVM itself, though it might make sense to add some sanity

EnumSet doesn't implement SequencedSet

2023-05-23 Thread Andrey Turbanov
Hello. I've noticed that EnumSet unfortunately doesn't implement the newly introduced interface SequencedSet. >From the first look it fits into it. Is there a reason for that? Sorry if it was already discussed. Andrey Turbanov

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it [v4]

2023-05-23 Thread Volker Simonis
On Mon, 22 May 2023 10:22:16 GMT, Volker Simonis wrote: >> Since JDK13, executing commands in a sub-process defaults to the so called >> `POSIX_SPAWN` launching mechanism (i.e. >> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by >> using `posix_spawn(3)` to firstly

Re: RFR: JDK-8298066: java/util/concurrent/locks/Lock/OOMEInAQS.java timed out [v2]

2023-05-23 Thread Alan Bateman
On Tue, 23 May 2023 08:22:22 GMT, Viktor Klang wrote: >> Doubling the max heap size since not all GCs might have compressed OOPs, so >> this change should make this test more robust. >> >> Cleared with @DougLea > > Viktor Klang has updated the pull request incrementally with one additional >

Re: RFR: JDK-8298066: java/util/concurrent/locks/Lock/OOMEInAQS.java timed out

2023-05-23 Thread Viktor Klang
On Tue, 23 May 2023 07:19:42 GMT, David Holmes wrote: >> @AlanBateman I wonder, perhaps it makes more sense, as you say, to clear the >> problem list together with this, and resurrect it in case it spuriously >> resurfaces. It's always a challenge to prove a negative. :) > > @viktorklang-ora

Re: RFR: JDK-8298066: java/util/concurrent/locks/Lock/OOMEInAQS.java timed out [v2]

2023-05-23 Thread Viktor Klang
> Doubling the max heap size since not all GCs might have compressed OOPs, so > this change should make this test more robust. > > Cleared with @DougLea Viktor Klang has updated the pull request incrementally with one additional commit since the last revision: Removing OOMEInAQS from zgc

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it [v4]

2023-05-23 Thread Marius Lichtblau
On Mon, 22 May 2023 10:22:16 GMT, Volker Simonis wrote: >> Since JDK13, executing commands in a sub-process defaults to the so called >> `POSIX_SPAWN` launching mechanism (i.e. >> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by >> using `posix_spawn(3)` to firstly

Re: RFR: JDK-8027711: Unify wildcarding syntax for CompileCommand and CompileOnly

2023-05-23 Thread Christian Hagedorn
On Thu, 4 May 2023 13:36:22 GMT, Tobias Holenstein wrote: > At the moment `CompileCommand` and `CompileOnly` use different syntax for > matching methods. > > ### Old CompileOnly format > - matching a **method name** with **class name** and **package name**: >

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v35]

2023-05-23 Thread Richard Reingruber
On Mon, 22 May 2023 22:44:41 GMT, Martin Doerr wrote: > Thanks for publishing our discussion, here. The unnecessary PSA affects other > areas of hotspot much more than Panama. Yes, we should file an RFE. I think > one for hotspot is sufficient as the downcall stub is part of it. I don't >

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v35]

2023-05-23 Thread Richard Reingruber
On Tue, 23 May 2023 07:37:37 GMT, Richard Reingruber wrote: >> Martin Doerr has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Parameter Save Area is the correct name. > > src/hotspot/cpu/ppc/downcallLinker_ppc.cpp line 163: > >> 161:

Integrated: JDK-8308300: enhance exceptions in MappedMemoryUtils.c

2023-05-23 Thread Matthias Baesken
On Fri, 19 May 2023 06:58:49 GMT, Matthias Baesken wrote: > MappedMemoryUtils.c can generate exceptions like those : > java.io.UncheckedIOException: java.io.IOException: Invalid argument >at > java.base/java.nio.MappedMemoryUtils.force(MappedMemoryUtils.java:105) >at

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v35]

2023-05-23 Thread Richard Reingruber
On Mon, 22 May 2023 22:29:18 GMT, Martin Doerr wrote: >> Implementation of "Foreign Function & Memory API" for linux on Power (Little >> Endian) according to "Power Architecture 64-Bit ELF V2 ABI Specification". >> >> This PR does not include code for VaList support because it's supposed to

Re: RFR: 8308281: Java snippets in the FFM API need to be updated [v6]

2023-05-23 Thread Per Minborg
> As the API has improved over the recent releases, not all `{@snippet ..}` > sections have been kept in sync. > > This PR suggests all snippets used should be verified against real code that > is placed in a new `snippet-files` folder and erroneous snippets are updated. > > In this PR, it is

Integrated: 8308093: Disable language preview features use in JDK

2023-05-23 Thread Adam Sotona
On Mon, 22 May 2023 10:01:55 GMT, Adam Sotona wrote: > This patch disables temporary use of language preview features in JDK. > Temporary enabled language preview features (to allow Pattern Matching for > switch use in the Classfile API library) are no more necessary. > All redundant use of

Re: RFR: 8308281: Java snippets in the FFM API need to be updated [v5]

2023-05-23 Thread Per Minborg
> As the API has improved over the recent releases, not all `{@snippet ..}` > sections have been kept in sync. > > This PR suggests all snippets used should be verified against real code that > is placed in a new `snippet-files` folder and erroneous snippets are updated. > > In this PR, it is

Re: RFR: JDK-8298066: java/util/concurrent/locks/Lock/OOMEInAQS.java timed out

2023-05-23 Thread David Holmes
On Mon, 22 May 2023 20:23:20 GMT, Viktor Klang wrote: >>> @AlanBateman My thinking was to integrate this and make sure that the >>> problem doesn't resurface before removing it from the problem list. Does >>> that make sense? 樂 >> >> No objection, it's just it would leave

Integrated: 8308038: java/util/concurrent/ThreadPerTaskExecutor/ThreadPerTaskExecutorTest.java timed out

2023-05-23 Thread Alan Bateman
On Sun, 21 May 2023 13:52:06 GMT, Alan Bateman wrote: > This is a test only change to the unit test for the ExecutorService returned > by Executors.newThreadPerTaskExecutor. The tests for interrupting invokeAll > assume the threads started to execute the tasks do actually execute the task >

Integrated: 8308235: ThreadContainer registry accumulates weak refs

2023-05-23 Thread Alan Bateman
On Thu, 18 May 2023 15:44:15 GMT, Alan Bateman wrote: > ThreadContainers is an internal class used to make thread pools and other > groupings of threads discoverable for observability. Some refactoring in 2021 > (in the loom repo, and before integration) accidentally changed the creation > of

Re: RFR: 8308281: Java snippets in the FFM API need to be updated [v4]

2023-05-23 Thread Per Minborg
> As the API has improved over the recent releases, not all `{@snippet ..}` > sections have been kept in sync. > > This PR suggests all snippets used should be verified against real code that > is placed in a new `snippet-files` folder and erroneous snippets are updated. > > In this PR, it is

Withdrawn: 8307205: Downcall to clibrary printf fails on OS X AArch64

2023-05-23 Thread Per Minborg
On Mon, 22 May 2023 15:21:37 GMT, Per Minborg wrote: > This PR adds a test that shows the documented way of calling `printf` works. This pull request has been closed without being integrated. - PR: https://git.openjdk.org/jdk/pull/14088

Re: RFR: 8307205: Downcall to clibrary printf fails on OS X AArch64

2023-05-23 Thread Per Minborg
On Mon, 22 May 2023 15:21:37 GMT, Per Minborg wrote: > This PR adds a test that shows the documented way of calling `printf` works. I've closed the bug explicitly because it was not a bug. I am going to close this PR as the test is a bit redundant. - PR Comment: