Re: RFR: 8280166: Extend java/lang/instrument/GetObjectSizeIntrinsicsTest.java test cases

2022-01-18 Thread Aleksey Shipilev
On Tue, 18 Jan 2022 19:36:18 GMT, Chris Plummer wrote: >> While working on JDK-8280003, I noticed that >> java/lang/instrument/GetObjectSizeIntrinsicsTest.java does not test arrays >> with more than 1-byte size elements, and no large arrays (past 4G limit) are >> tested either. It would be bet

Re: RFR: 8275731: CDS archived enums objects are recreated at runtime [v3]

2022-01-18 Thread Ioi Lam
On Mon, 17 Jan 2022 19:22:23 GMT, Coleen Phillimore wrote: > I don't really know this code well enough to do a good code review. I had > some comments though. Hi Coleen, thanks for taking a look. This PR has two major parts: 1. Check for inappropriate reference to static fields. This is mainl

Re: RFR: 8275731: CDS archived enums objects are recreated at runtime [v3]

2022-01-18 Thread Ioi Lam
On Mon, 17 Jan 2022 18:36:35 GMT, Coleen Phillimore 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 four additional commits >>

Re: RFR: 8275731: CDS archived enums objects are recreated at runtime [v4]

2022-01-18 Thread Ioi Lam
> **Background:** > > In the Java Language, Enums can be tested for equality, so the constants in > an Enum type must be unique. Javac compiles an enum declaration like this: > > > public enum Day { SUNDAY, MONDAY ... } > > > to > > > public class Day extends java.lang.Enum { > public

Re: RFR: 8279921: Dump the .class file in jlink debug mode for any failure during transform() of a plugin

2022-01-18 Thread Mandy Chung
On Wed, 12 Jan 2022 13:45:00 GMT, Jaikiran Pai wrote: > Can I please get a review for this change which addresses > https://bugs.openjdk.java.net/browse/JDK-8279921? > > The change here builds upon the debugging enhancement that was done in > https://github.com/openjdk/jdk/pull/6696 to try and

Re: RFR: JDK-8280168 Add Objects.toDefaultString [v2]

2022-01-18 Thread Joe Darcy
On Wed, 19 Jan 2022 02:22:33 GMT, Roger Riggs wrote: >> Joe Darcy has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Respond to review feedback. > > src/java.base/share/classes/java/util/Objects.java line 170: > >> 168: * {@return a s

Re: RFR: JDK-8280168 Add Objects.toDefaultString [v2]

2022-01-18 Thread Joe Darcy
> While it is strongly recommend to not use the default toString for a class, > at times it is the least-bad alternative. When that alternative needs to be > used, it would be helpful to have the implementation already available, such > as in Objects.toDefaultString(). This method is analagous t

Re: RFR: JDK-8280168 Add Objects.toDefaultString

2022-01-18 Thread Roger Riggs
On Tue, 18 Jan 2022 23:15:20 GMT, Joe Darcy wrote: > While it is strongly recommend to not use the default toString for a class, > at times it is the least-bad alternative. When that alternative needs to be > used, it would be helpful to have the implementation already available, such > as in

Re: LambdaMetafactory requires full privilege access, but doesn't seem to actually restrict functionality

2022-01-18 Thread Steven Schlansker
> On Jan 18, 2022, at 6:43 AM, Michael Kuhlmann wrote: > > Hi Steven! > > Sorry for coming back so lately; the main reason is that I can't answer your > question. The issue you are describing indeed is a bit weird, and I can only > speculate that it's like this because LambdaMetaFactory was

Re: LambdaMetafactory requires full privilege access, but doesn't seem to actually restrict functionality

2022-01-18 Thread Steven Schlansker
> On Jan 13, 2022, at 7:05 AM, Remi Forax wrote: > > - Original Message - >> From: "Steven Schlansker" >> To: "core-libs-dev" >> Sent: Wednesday, January 12, 2022 9:56:30 PM >> Subject: LambdaMetafactory requires full privilege access, but doesn't seem >> to actually restrict functi

RFR: JDK-8280168 Add Objects.toDefaultString

2022-01-18 Thread Joe Darcy
While it is strongly recommend to not use the default toString for a class, at times it is the least-bad alternative. When that alternative needs to be used, it would be helpful to have the implementation already available, such as in Objects.toDefaultString(). This method is analagous to System

Integrated: 8257434: jpackage fails to create rpm on Fedora Linux

2022-01-18 Thread Alexey Semenyuk
On Tue, 1 Dec 2020 23:54:11 GMT, Alexey Semenyuk wrote: > Add missing quotes to `%if` expressions in spec template. Required by > rpmbuild 4.16.0 This pull request has now been integrated. Changeset: 541c7f74 Author:Alexey Semenyuk URL: https://git.openjdk.java.net/jdk/commit/541c7

Re: Integrated: 8257434: jpackage fails to create rpm on Fedora Linux

2022-01-18 Thread Alexey Semenyuk
On Tue, 1 Dec 2020 23:54:11 GMT, Alexey Semenyuk wrote: > Add missing quotes to `%if` expressions in spec template. Required by > rpmbuild 4.16.0 @sashamatveev @andyherrick please review - PR: https://git.openjdk.java.net/jdk/pull/1551

Re: Integrated: 8257434: jpackage fails to create rpm on Fedora Linux

2022-01-18 Thread Andy Herrick
On Tue, 1 Dec 2020 23:54:11 GMT, Alexey Semenyuk wrote: > Add missing quotes to `%if` expressions in spec template. Required by > rpmbuild 4.16.0 looks good - Marked as reviewed by herrick (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/1551

Re: Integrated: 8257434: jpackage fails to create rpm on Fedora Linux

2022-01-18 Thread Alexander Matveev
On Tue, 1 Dec 2020 23:54:11 GMT, Alexey Semenyuk wrote: > Add missing quotes to `%if` expressions in spec template. Required by > rpmbuild 4.16.0 Marked as reviewed by almatvee (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/1551

Integrated: 8257434: jpackage fails to create rpm on Fedora Linux

2022-01-18 Thread Alexey Semenyuk
Add missing quotes to `%if` expressions in spec template. Required by rpmbuild 4.16.0 - Commit messages: - 8257434: jpackage fails to create rpm on Fedora Linux Changes: https://git.openjdk.java.net/jdk/pull/1551/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1551&ran

Re: RFR: 8280124: Reduce branches decoding latin-1 chars from UTF-8 encoded bytes

2022-01-18 Thread John Rose
It’s kind of sad that you have to do this by hand. The JVM should recognize that those back-to-back if statements (in the bytecode) can be combined into a non-branching O(1) test. One item on my (very long) wish list for the JVM is giving more comprehensive attention to the task of testing members

RFR: 8280174: Possible NPE in Thread.dispatchUncaughtException

2022-01-18 Thread Andrey Turbanov
Method `Thread.dispatchUncaughtException` (called by VM) uses result of of `getUncaughtExceptionHandler`. Field `uncaughtExceptionHandler` is volatile and can be changed by another Thread. Which could lead to NPE. https://github.com/openjdk/jdk/blob/7b6738fa02023825ed9e602555bd5ed2b87a6ca6/src/ja

Re: RFR: 8280041: Retry loop issues in java.io.ClassCache

2022-01-18 Thread Roger Riggs
On Fri, 14 Jan 2022 19:27:18 GMT, Aleksey Shipilev wrote: > JDK-8277072 introduced java.io.ClassCache, but there seem to be at least two > issues with it: > - The cache cannot disambiguate between cleared SoftReference and the > accidental passing of `null` value; in that case, the retry loop

Re: RFR: 8280166: Extend java/lang/instrument/GetObjectSizeIntrinsicsTest.java test cases

2022-01-18 Thread Chris Plummer
On Tue, 18 Jan 2022 18:33:29 GMT, Aleksey Shipilev wrote: > While working on JDK-8280003, I noticed that > java/lang/instrument/GetObjectSizeIntrinsicsTest.java does not test arrays > with more than 1-byte size elements, and no large arrays (past 4G limit) are > tested either. It would be bett

Integrated: 8280124: Reduce branches decoding latin-1 chars from UTF-8 encoded bytes

2022-01-18 Thread Claes Redestad
On Tue, 18 Jan 2022 10:08:35 GMT, Claes Redestad wrote: > This resolves minor inefficiency in the fast-path for decoding latin-1 chars > from UTF-8. I also took the opportunity to refactor the StringDecode > microbenchmark to align with recent changes to the StringEncode micro. > > The ineffic

Re: RFR: 8280124: Reduce branches decoding latin-1 chars from UTF-8 encoded bytes [v2]

2022-01-18 Thread Claes Redestad
On Tue, 18 Jan 2022 16:27:11 GMT, Claes Redestad wrote: >> This resolves minor inefficiency in the fast-path for decoding latin-1 chars >> from UTF-8. I also took the opportunity to refactor the StringDecode >> microbenchmark to align with recent changes to the StringEncode micro. >> >> The in

Re: RFR: 8280041: Retry loop issues in java.io.ClassCache

2022-01-18 Thread Aleksey Shipilev
On Tue, 18 Jan 2022 18:22:26 GMT, Roger Riggs wrote: > Can a test be written to verify the correct handling of nulls. `java.io.ClassCache` is not public (for a reason), I struggle to find a way to access it from a jtreg test... - PR: https://git.openjdk.java.net/jdk/pull/7092

RFR: 8280166: Extend java/lang/instrument/GetObjectSizeIntrinsicsTest.java test cases

2022-01-18 Thread Aleksey Shipilev
While working on JDK-8280003, I noticed that java/lang/instrument/GetObjectSizeIntrinsicsTest.java does not test arrays with more than 1-byte size elements, and no large arrays (past 4G limit) are tested either. It would be better to add those test cases. Additional testing: - [x] Linux x86_6

Re: RFR: 8280041: Retry loop issues in java.io.ClassCache

2022-01-18 Thread Roger Riggs
On Fri, 14 Jan 2022 19:27:18 GMT, Aleksey Shipilev wrote: > JDK-8277072 introduced java.io.ClassCache, but there seem to be at least two > issues with it: > - The cache cannot disambiguate between cleared SoftReference and the > accidental passing of `null` value; in that case, the retry loop

Integrated: 8272746: ZipFile can't open big file (NegativeArraySizeException)

2022-01-18 Thread Masanori Yano
On Thu, 23 Dec 2021 10:55:08 GMT, Masanori Yano wrote: > Could you please review the JDK-8272746 bug fixes? > Since the array index is of type int, the overflow occurs when the value of > end.cenlen is too large because of too many entries. > It is necessary to read a part of the CEN from the fi

Re: RFR: 8280124: Reduce branches decoding latin-1 chars from UTF-8 encoded bytes [v2]

2022-01-18 Thread Naoto Sato
On Tue, 18 Jan 2022 16:27:11 GMT, Claes Redestad wrote: >> This resolves minor inefficiency in the fast-path for decoding latin-1 chars >> from UTF-8. I also took the opportunity to refactor the StringDecode >> microbenchmark to align with recent changes to the StringEncode micro. >> >> The in

Re: RFR: 8280124: Reduce branches decoding latin-1 chars from UTF-8 encoded bytes [v2]

2022-01-18 Thread Claes Redestad
> This resolves minor inefficiency in the fast-path for decoding latin-1 chars > from UTF-8. I also took the opportunity to refactor the StringDecode > microbenchmark to align with recent changes to the StringEncode micro. > > The inefficiency is that this test is quite branchy: > > `if ((b1 ==

RFR: 8279488: ProcessBuilder inherits contextClassLoader when spawning a process reaper thread

2022-01-18 Thread Roger Riggs
The thread factory used to create the process reaper threads unnecessarily inherits the callers thread context classloader. The result is retention of the class loader. The thread factory used for the pool of process reaper threads is modified to use an InnocuousThread with a given stacksize. Th

Integrated: 8280010: Remove double buffering of InputStream for Properties.load

2022-01-18 Thread Andrey Turbanov
On Mon, 10 Jan 2022 20:46:36 GMT, Andrey Turbanov wrote: > `Properties.load` uses `java.util.Properties.LineReader`. LineReader already > buffers input stream. Hence wrapping InputStream in BufferedInputStream is > redundant. This pull request has now been integrated. Changeset: 9eb50a5e Auth

Re: RFR: 8280124: Reduce branches decoding latin-1 chars from UTF-8 encoded bytes

2022-01-18 Thread Alan Bateman
On Tue, 18 Jan 2022 10:08:35 GMT, Claes Redestad wrote: > This resolves minor inefficiency in the fast-path for decoding latin-1 chars > from UTF-8. I also took the opportunity to refactor the StringDecode > microbenchmark to align with recent changes to the StringEncode micro. > > The ineffic

Re: RFR: 8280124: Reduce branches decoding latin-1 chars from UTF-8 encoded bytes

2022-01-18 Thread Roger Riggs
On Tue, 18 Jan 2022 10:08:35 GMT, Claes Redestad wrote: > This resolves minor inefficiency in the fast-path for decoding latin-1 chars > from UTF-8. I also took the opportunity to refactor the StringDecode > microbenchmark to align with recent changes to the StringEncode micro. > > The ineffic

Re: LambdaMetafactory requires full privilege access, but doesn't seem to actually restrict functionality

2022-01-18 Thread Michael Kuhlmann
Hi Steven! Sorry for coming back so lately; the main reason is that I can't answer your question. The issue you are describing indeed is a bit weird, and I can only speculate that it's like this because LambdaMetaFactory was mainly designed to be used in bootstrap methods for invokedynamic cal

Re: RFR: JDK-8279954 - java/lang/StringBuffer(StringBuilder)/HugeCapacity.java intermittently fails

2022-01-18 Thread Jim Laskey
On Fri, 14 Jan 2022 14:33:13 GMT, Jim Laskey wrote: > Tests were fatally failing (windows) on Github actions. Pumping up the memory > requirements will hopefully alleviate. The first three tests allocate (3 x ) two 2G arrays. Thinking that 5G is cutting it close. - PR: https://gi

Re: RFR: 8280124: Reduce branches decoding latin-1 chars from UTF-8 encoded bytes

2022-01-18 Thread Claes Redestad
On Tue, 18 Jan 2022 10:08:35 GMT, Claes Redestad wrote: > This resolves minor inefficiency in the fast-path for decoding latin-1 chars > from UTF-8. I also took the opportunity to refactor the StringDecode > microbenchmark to align with recent changes to the StringEncode micro. > > The ineffic

RFR: 8280124: Reduce branches decoding latin-1 chars from UTF-8 encoded bytes

2022-01-18 Thread Claes Redestad
This resolves minor inefficiency in the fast-path for decoding latin-1 chars from UTF-8. I also took the opportunity to refactor the StringDecode microbenchmark to align with recent changes to the StringEncode micro. The inefficiency is that this test is quite branchy: `if ((b1 == (byte)0xc2 ||

Integrated: 8278892: java.naming module description is missing @uses tags to document the services that it uses

2022-01-18 Thread Masanori Yano
On Wed, 12 Jan 2022 05:48:26 GMT, Masanori Yano wrote: > I have fixed the javadoc comments as the definition. Could you review this > fix? This pull request has now been integrated. Changeset: 94522626 Author:Masanori Yano Committer: Aleksei Efimov URL: https://git.openjdk.java.ne

Re: RFR: 8280041: Retry loop issues in java.io.ClassCache

2022-01-18 Thread Roman Kennke
On Fri, 14 Jan 2022 22:26:31 GMT, Aleksey Shipilev wrote: > > One additional improvement would be to change r.get() == null to > > r.refersTo(null) to check for cleared reference, that avoids reviving the > > referent, e.g. in SATB GCs. I leave that up to you. > > I think that does not work, b

Re: RFR: 8280041: Retry loop issues in java.io.ClassCache

2022-01-18 Thread Roman Kennke
On Fri, 14 Jan 2022 19:27:18 GMT, Aleksey Shipilev wrote: > JDK-8277072 introduced java.io.ClassCache, but there seem to be at least two > issues with it: > - The cache cannot disambiguate between cleared SoftReference and the > accidental passing of `null` value; in that case, the retry loop