Re: Java Floating Points.

2022-04-25 Thread Joseph D. Darcy
In the spirit of repeating previous messages, I again refer interested readers to my 2018 email to core-libs-dev which addresses many of the technical points being (re)raised here: http://mail.openjdk.java.net/pipermail/core-libs-dev/2018-March/051952.html Appeal to authority is a commonly

RFR: 8282227: Locale information for nb is not working properly

2022-04-25 Thread Naoto Sato
This was caused by incorporating CLDR v39, which switched the Norwegian locale inheritance from `no` -> `nb` to `nb` ->`no` and moved the resources from `nb` to `no`, which now contradicts Java's locale fallback. Explicitly inheriting `no` from `nb` will fix the issue. - Commit

Integrated: JDK-8285614: Fix typo in java.lang.Float

2022-04-25 Thread Joe Darcy
On Mon, 25 Apr 2022 22:22:29 GMT, Joe Darcy wrote: > Fix typo introduced in JDK-8261123. This pull request has now been integrated. Changeset: d435d692 Author:Joe Darcy URL: https://git.openjdk.java.net/jdk/commit/d435d692b0bbc0164a1fd1bf3616ee61a3c1c58b Stats: 1 line in 1 file

Re: RFR: JDK-8285614: Fix typo in java.lang.Float

2022-04-25 Thread Iris Clark
On Mon, 25 Apr 2022 22:22:29 GMT, Joe Darcy wrote: > Fix typo introduced in JDK-8261123. Marked as reviewed by iris (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/8390

Re: RFR: 8284642: Unexpected behavior of -XX:MaxDirectMemorySize=0 [v3]

2022-04-25 Thread David Holmes
On Mon, 25 Apr 2022 14:26:17 GMT, Harold Seigel wrote: >> Please review this small fix for JDK-8284642. The fix was tested by running >> Mach5 tiers 1-2 on Linux, Mac OS, and Windows, and Mach5 tiers 3-5 on Linux >> x64. Additionally, the modified test and the test in the bug report were >>

Re: RFR: JDK-8285614: Fix typo in java.lang.Float

2022-04-25 Thread Lance Andersen
On Mon, 25 Apr 2022 22:22:29 GMT, Joe Darcy wrote: > Fix typo introduced in JDK-8261123. Marked as reviewed by lancea (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/8390

Re: RFR: JDK-8285614: Fix typo in java.lang.Float

2022-04-25 Thread Naoto Sato
On Mon, 25 Apr 2022 22:22:29 GMT, Joe Darcy wrote: > Fix typo introduced in JDK-8261123. Marked as reviewed by naoto (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/8390

RFR: JDK-8285614: Fix typo in java.lang.Float

2022-04-25 Thread Joe Darcy
Fix typo introduced in JDK-8261123. - Commit messages: - JDK-8285614: Fix typo in java.lang.Float Changes: https://git.openjdk.java.net/jdk/pull/8390/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk=8390=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8285614 Stats:

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v5]

2022-04-25 Thread Lance Andersen
On Thu, 21 Apr 2022 11:35:57 GMT, Alan Bateman wrote: >> This is the implementation of JEP 425: Virtual Threads (Preview); TBD which >> JDK version to target. >> >> We will refresh this PR periodically to pick up changes and fixes from the >> loom repo. >> >> Most of the new mechanisms in

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v6]

2022-04-25 Thread Lance Andersen
On Mon, 25 Apr 2022 13:19:49 GMT, Alan Bateman wrote: >> This is the implementation of JEP 425: Virtual Threads (Preview); TBD which >> JDK version to target. >> >> We will refresh this PR periodically to pick up changes and fixes from the >> loom repo. >> >> Most of the new mechanisms in

Re: RFR: JDK-8266431: Dual-Pivot Quicksort improvements (Radix sort) [v12]

2022-04-25 Thread iaroslavski
On Mon, 14 Mar 2022 19:12:29 GMT, iaroslavski wrote: >> Sorting: >> >> - adopt radix sort for sequential and parallel sorts on >> int/long/float/double arrays (almost random and length > 6K) >> - fix tryMergeRuns() to better handle case when the last run is a single >> element >> - minor

Withdrawn: 8285255: refine StringLatin1.regionMatchesCI_UTF16

2022-04-25 Thread XenoAmess
On Tue, 19 Apr 2022 21:15:29 GMT, XenoAmess wrote: > some thoughts after watching 8285001: Simplify StringLatin1.regionMatches > https://github.com/openjdk/jdk/pull/8292/ > > if (Character.toLowerCase(u1) == Character.toLowerCase(u2)) { > continue; > }

Re: RFR: 8285255: refine StringLatin1.regionMatchesCI_UTF16 [v3]

2022-04-25 Thread XenoAmess
On Wed, 20 Apr 2022 21:08:19 GMT, XenoAmess wrote: >> some thoughts after watching 8285001: Simplify StringLatin1.regionMatches >> https://github.com/openjdk/jdk/pull/8292/ >> >> if (Character.toLowerCase(u1) == Character.toLowerCase(u2)) { >> continue; >>

Re: RFR: 8285255: refine StringLatin1.regionMatchesCI_UTF16 [v3]

2022-04-25 Thread XenoAmess
On Mon, 25 Apr 2022 15:10:01 GMT, Claes Redestad wrote: > Unfortunately this leads to an error for case-insensitive `regionMatches` > between a latin-1-string that contains either of `\u00b5` or `\u00ff` (these > two code-points have upper case codepoints outside of the latin-1 range) and > a

Regression after April Java 17 Update (mime types)

2022-04-25 Thread Bernd Eckenfels
Hello, We just tried to push out the Java 17 April Update but it failed with some incompatible behavior. We found out it is caused due to a new mime-type (and a bug in Apache VFS) that JAR files could no longer be opened in an overlay (technically a JAR URL suddenly had a mime-type and

Integrated: 8285477: Add a PRECISION public static field to j.l.Float and j.l.Double

2022-04-25 Thread Raffaello Giulietti
On Fri, 22 Apr 2022 14:26:07 GMT, Raffaello Giulietti wrote: > Add useful constants specified in IEEE 754. This pull request has now been integrated. Changeset: fb605944 Author:Raffaello Giulietti Committer: Joe Darcy URL:

Re: RFR: 8283620: System.out does not use the encoding/charset specified in the Javadoc [v2]

2022-04-25 Thread Naoto Sato
On Sat, 23 Apr 2022 05:53:17 GMT, David Holmes wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Modified the spec for the new system properties. > > src/java.base/share/classes/java/lang/System.java line 774: > >>

Re: RFR: 8283620: System.out does not use the encoding/charset specified in the Javadoc [v3]

2022-04-25 Thread Naoto Sato
> Promoting the internal system properties for `System.out` and `System.err` so > that users can override the encoding used for those streams to `UTF-8`, > aligning to the `Charset.defaultCharset()`. A CSR has also been drafted. Naoto Sato has updated the pull request incrementally with one

Re: System.exit deadlock if called within a hook

2022-04-25 Thread David Lloyd
On Mon, Apr 25, 2022 at 9:25 AM wrote: > > Ok, you're right that it can raise an exception when the calling thread does > not have the security privileges needed. But what if it had them ? Right now > the deadlock comes from the fact is doesn't got back to the caller with an > exception and

Re: RFR: 8285255: refine StringLatin1.regionMatchesCI_UTF16 [v3]

2022-04-25 Thread Claes Redestad
On Wed, 20 Apr 2022 21:08:19 GMT, XenoAmess wrote: >> some thoughts after watching 8285001: Simplify StringLatin1.regionMatches >> https://github.com/openjdk/jdk/pull/8292/ >> >> if (Character.toLowerCase(u1) == Character.toLowerCase(u2)) { >> continue; >>

Re: RFR: 8284642: Unexpected behavior of -XX:MaxDirectMemorySize=0 [v2]

2022-04-25 Thread Harold Seigel
On Fri, 22 Apr 2022 18:14:27 GMT, Harold Seigel wrote: >> Please review this small fix for JDK-8284642. The fix was tested by running >> Mach5 tiers 1-2 on Linux, Mac OS, and Windows, and Mach5 tiers 3-5 on Linux >> x64. Additionally, the modified test and the test in the bug report were >>

Re: RFR: 8284642: Unexpected behavior of -XX:MaxDirectMemorySize=0 [v3]

2022-04-25 Thread Harold Seigel
> Please review this small fix for JDK-8284642. The fix was tested by running > Mach5 tiers 1-2 on Linux, Mac OS, and Windows, and Mach5 tiers 3-5 on Linux > x64. Additionally, the modified test and the test in the bug report were run > locally. > > Thanks, Harold Harold Seigel has updated

RE: System.exit deadlock if called within a hook

2022-04-25 Thread remi.catherinot
Ok, you're right that it can raise an exception when the calling thread does not have the security privileges needed. But what if it had them ? Right now the deadlock comes from the fact is doesn't got back to the caller with an exception and doesn't end the current thread. My 1st proposal was

Re: RFR: 8284992: Fix misleading Vector API doc for LSHR operator

2022-04-25 Thread Jie Fu
On Wed, 20 Apr 2022 17:24:56 GMT, Paul Sandoz wrote: >> Hi all, >> >> The Current Vector API doc for `LSHR` is >> >> Produce a>>>(n&(ESIZE*8-1)). Integral only. >> >> >> This is misleading which may lead to bugs for Java developers. >> This is because for negative byte/short elements, the

Re: RFR: 8284779: Test java/util/logging/Logger/logrb/TestLogrbResourceBundle.java fails intermittently with vthreads wrapper [v2]

2022-04-25 Thread Alan Bateman
On Mon, 25 Apr 2022 13:56:04 GMT, Daniel Fuchs wrote: >> Hi, >> >> Please find enclosed a patch to fix a rare intermittent failure that was >> detected while testing virtual threads. >> The issue has nothing to do with virtual threads, the test is simply missing >> a reachability fence to

Re: RFR: 8284779: Test java/util/logging/Logger/logrb/TestLogrbResourceBundle.java fails intermittently with vthreads wrapper [v2]

2022-04-25 Thread Alan Bateman
On Mon, 25 Apr 2022 13:52:38 GMT, Daniel Fuchs wrote: >> Hi, >> >> Please find enclosed a patch to fix a rare intermittent failure that was >> detected while testing virtual threads. >> The issue has nothing to do with virtual threads, the test is simply missing >> a reachability fence to

Re: RFR: 8284779: Test java/util/logging/Logger/logrb/TestLogrbResourceBundle.java fails intermittently with vthreads wrapper [v2]

2022-04-25 Thread Daniel Fuchs
On Mon, 25 Apr 2022 13:48:47 GMT, Alan Bateman wrote: >> Daniel Fuchs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update copyright year again > > test/jdk/java/util/logging/Logger/logrb/TestLogrbResourceBundle.java line 3: > >> 1:

Re: RFR: 8284779: Test java/util/logging/Logger/logrb/TestLogrbResourceBundle.java fails intermittently with vthreads wrapper [v2]

2022-04-25 Thread Daniel Fuchs
> Hi, > > Please find enclosed a patch to fix a rare intermittent failure that was > detected while testing virtual threads. > The issue has nothing to do with virtual threads, the test is simply missing > a reachability fence to make sure that the parent logger is not garbage > collected

Re: System.exit deadlock if called within a hook

2022-04-25 Thread David Lloyd
On Mon, Apr 25, 2022 at 8:09 AM wrote: > because it would still run finally blocks, which cannot happen for no return > methods like System.exit and Runtime.halt FWIW I don't think this is correct. `exit` and `halt` etc. cannot *return* but they're definitely allowed to throw an exception

RFR: 8284779: Test java/util/logging/Logger/logrb/TestLogrbResourceBundle.java fails intermittently with vthreads wrapper

2022-04-25 Thread Daniel Fuchs
Hi, Please find enclosed a patch to fix a rare intermittent failure that was detected while testing virtual thread. The issue has nothing to do with virtual thread, the test is simply missing a reachability fence to make sure that the parent logger is not garbage collected until its child

Re: RFR: 8285445: cannot open file "NUL:"

2022-04-25 Thread David M . Lloyd
On Sat, 23 Apr 2022 15:24:13 GMT, Alan Bateman wrote: > > FWIW we fixed the same problem by simply using `NUL` instead of `NUL:`. > > Hopefully newer code can use OutputStream.nullOutputStream(). It's portable > and avoids depending on these legacy Windows specific reserved names. One

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v6]

2022-04-25 Thread Alan Bateman
> This is the implementation of JEP 425: Virtual Threads (Preview); TBD which > JDK version to target. > > We will refresh this PR periodically to pick up changes and fixes from the > loom repo. > > Most of the new mechanisms in the HotSpot VM are disabled by default and > require running

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v5]

2022-04-25 Thread Alan Bateman
On Fri, 22 Apr 2022 02:26:50 GMT, ExE Boss wrote: >> Alan Bateman has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Refresh > > src/java.base/share/classes/java/lang/ThreadLocal.java line 179: > >> 177: private T get(Thread t) { >>

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v2]

2022-04-25 Thread Alan Bateman
On Fri, 15 Apr 2022 21:24:58 GMT, Paul Sandoz wrote: >> Alan Bateman has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Refresh > > src/java.base/share/classes/jdk/internal/vm/Continuation.java line 115: > >> 113: } >> 114: >> 115:

System.exit deadlock if called within a hook

2022-04-25 Thread remi.catherinot
Hi, Exemple code to deadlock the JVM. Only Runtime.halt from within the JVM or a SIGKILL from outside stops it. Normal kills and Ctrl-C (which is a SIGTERM) fail to do so. public class ExitInHookDemo { public static void main(String...args) {

Re: RFR: 8283620: System.out does not use the encoding/charset specified in the Javadoc [v2]

2022-04-25 Thread Alan Bateman
On Fri, 22 Apr 2022 18:14:18 GMT, Naoto Sato wrote: >> Promoting the internal system properties for `System.out` and `System.err` >> so that users can override the encoding used for those streams to `UTF-8`, >> aligning to the `Charset.defaultCharset()`. A CSR has also been drafted. > > Naoto

Re: RFR: 8283620: System.out does not use the encoding/charset specified in the Javadoc [v2]

2022-04-25 Thread Alan Bateman
On Sat, 23 Apr 2022 05:55:15 GMT, David Holmes wrote: > I think Alan has a typo: "clears" -> "leads" Apologies, there was a typo in my comment on the PR. I didn't mean for the word "clears" to go into the spec. - PR: https://git.openjdk.java.net/jdk/pull/8270