Re: RFR: 8268349: Provide more detail in JEP 411 warning messages

2021-06-07 Thread Alan Bateman
On Tue, 8 Jun 2021 06:30:00 GMT, David Holmes wrote: > You might want to make your "WARNING" consistent with the VM's "Warning" so > that OutputAnalyzer's logic to ignore warnings will automatically ignore > these too. The uppercase "WARNING" is intentional here, it was the same with illegal

Re: RFR: 8268349: Provide more detail in JEP 411 warning messages

2021-06-07 Thread David Holmes
On Mon, 7 Jun 2021 20:42:53 GMT, Weijun Wang wrote: > More loudly and precise warning messages when a security manager is either > enabled at startup or installed at runtime. There are a number of hotspot tests that will trigger this warning, so please ensure they work correctly with the extra

Re: RFR: 8268227: java/foreign/TestUpcall.java still times out

2021-06-07 Thread David Holmes
On 8/06/2021 5:23 am, Daniel D.Daugherty wrote: On Fri, 4 Jun 2021 10:53:42 GMT, Maurizio Cimadamore wrote: Turns out that adding more timeout is a lost cause here. The root cause of the slowdown when running the test in debug build is: https://bugs.openjdk.java.net/browse/JDK-8266074 Whic

Re: RFR: 8268349: Provide more detail in JEP 411 warning messages

2021-06-07 Thread Alan Bateman
On Mon, 7 Jun 2021 20:42:53 GMT, Weijun Wang wrote: > More loudly and precise warning messages when a security manager is either > enabled at startup or installed at runtime. Changes requested by alanb (Reviewer). src/java.base/share/classes/java/lang/System.java line 331: > 329: > 330:

Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS [v5]

2021-06-07 Thread David Holmes
On Mon, 7 Jun 2021 03:18:32 GMT, Henry Jen wrote: >> …d on macOS >> >> This patch simply round up the specified stack size to multiple of the >> system page size. >> >> Test is trivial, simply run java with -Xss option against following code. On >> MacOS, before the fix, running with `-Xss15

Re: RFR: 8265909 : build.tools.dtdbuilder.DTDBuilder.java failed detecting missing path of dtd_home

2021-06-07 Thread ScientificWare
On Thu, 22 Apr 2021 13:47:03 GMT, ScientificWare wrote: > This concerns [dtdbuilder > tools](https://github.com/openjdk/jdk/tree/master/make/jdk/src/classes/build/tools/dtdbuilder). > > In jshell, try `System.getProperty("html32") + ""` you'll get a `String`. > > So, in `DTDBuilder.java` when

Re: RFR: 8268192: LambdaMetafactory with invokespecial causes VerificationError

2021-06-07 Thread liach
On Mon, 7 Jun 2021 23:58:44 GMT, Dan Smith wrote: > Small bug fix. src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java line 191: > 189: useImplMethodHandle = > (Modifier.isProtected(implInfo.getModifiers()) && > 190:!VerifyAcce

Re: RFR: 8268276: Base64 Decoding optimization for x86 using AVX-512 [v3]

2021-06-07 Thread Jatin Bhateja
On Tue, 8 Jun 2021 00:30:38 GMT, Scott Gibbons wrote: >> Add the Base64 Decode intrinsic for x86 to utilize AVX-512 for acceleration. >> Also allows for performance improvement for non-AVX-512 enabled platforms. >> Due to the nature of MIME-encoded inputs, modify the intrinsic signature to >>

Re: RFR: 8268276: Base64 Decoding optimization for x86 using AVX-512 [v3]

2021-06-07 Thread Scott Gibbons
> Add the Base64 Decode intrinsic for x86 to utilize AVX-512 for acceleration. > Also allows for performance improvement for non-AVX-512 enabled platforms. > Due to the nature of MIME-encoded inputs, modify the intrinsic signature to > accept an additional parameter (isMIME) for fast-path MIME d

Re: RFR: 8268276: Base64 Decoding optimization for x86 using AVX-512 [v2]

2021-06-07 Thread Corey Ashford
On Tue, 8 Jun 2021 00:11:42 GMT, Scott Gibbons wrote: >> src/java.base/share/classes/java/util/Base64.java line 813: >> >>> 811: while (sp < sl) { >>> 812: if (shiftto == 18 && sp < sl - 4) { // fast path >>> 813: int dl = decodeBlock(src, s

Re: RFR: 8268276: Base64 Decoding optimization for x86 using AVX-512 [v2]

2021-06-07 Thread Scott Gibbons
On Mon, 7 Jun 2021 22:34:33 GMT, Corey Ashford wrote: >> Scott Gibbons has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update full name > > src/java.base/share/classes/java/util/Base64.java line 813: > >> 811: while (sp < sl

RFR: 8268192: LambdaMetafactory with invokespecial causes VerificationError

2021-06-07 Thread Dan Smith
Small bug fix. - Commit messages: - Fix merge markup - Merge branch 'master' into 8268192 - Merge branch '8174222' into 8268192 - Fix stray renaming - Apply renamings to LambdaProxyClassArchive - Address reviewer comments - Turn back on test case that was failing - Merge branc

Re: RFR: 8264766: ClassCastException during template compilation (Variable can not be cast to Param)

2021-06-07 Thread Joe Wang
On Mon, 7 Jun 2021 18:49:19 GMT, Joe Wang wrote: > Fixes the addVariable/addParam methods in the SymbolTable to check types > before casting. Thanks Naoto! Yeah, we're trying to keep the code level at 8 at the moment unless necessary (e.g. the optional elements for Deprecated), pattern matc

Integrated: 8174222: LambdaMetafactory: validate inputs and improve documentation

2021-06-07 Thread Dan Smith
On Thu, 3 Jun 2021 20:03:53 GMT, Dan Smith wrote: > Standardizes and better specifies the errors thrown by LambdaMetafactory, > including for inputs that would not be generated by javac. > > Does some renaming of core parameters/fields to better reflect their purpose. > > In the implementation

Re: RFR: 8268276: Base64 Decoding optimization for x86 using AVX-512 [v2]

2021-06-07 Thread Corey Ashford
On Mon, 7 Jun 2021 13:20:20 GMT, Scott Gibbons wrote: >> Add the Base64 Decode intrinsic for x86 to utilize AVX-512 for acceleration. >> Also allows for performance improvement for non-AVX-512 enabled platforms. >> Due to the nature of MIME-encoded inputs, modify the intrinsic signature to >>

Re: RFR: 8264766: ClassCastException during template compilation (Variable can not be cast to Param)

2021-06-07 Thread Naoto Sato
On Mon, 7 Jun 2021 18:49:19 GMT, Joe Wang wrote: > Fixes the addVariable/addParam methods in the SymbolTable to check types > before casting. Looks good. I'd be tempted to write `v instanceof Param p ? p : null;`, but then it could not be backported. - Marked as reviewed by naoto

RFR: 8268349: Provide more detail in JEP 411 warning messages

2021-06-07 Thread Weijun Wang
More loudly and precise warning messages when either a security manager is enabled at startup or installed at runtime. - Commit messages: - 8268349: Provide more detail in JEP 411 warning messages Changes: https://git.openjdk.java.net/jdk/pull/4400/files Webrev: https://webrevs.op

Re: RFR: 8267630: Start of release updates for JDK 18 [v5]

2021-06-07 Thread Iris Clark
On Mon, 7 Jun 2021 19:38:58 GMT, Joe Darcy wrote: >> 8267630: Start of release updates for JDK 18 > > Joe Darcy 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 requ

Re: RFR: 8267630: Start of release updates for JDK 18 [v5]

2021-06-07 Thread Joe Darcy
> 8267630: Start of release updates for JDK 18 Joe Darcy 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 17 additional commits since the last revision:

Re: RFR: 8268227: java/foreign/TestUpcall.java still times out

2021-06-07 Thread Daniel D . Daugherty
On Fri, 4 Jun 2021 10:53:42 GMT, Maurizio Cimadamore wrote: > Turns out that adding more timeout is a lost cause here. The root cause of > the slowdown when running the test in debug build is: > > https://bugs.openjdk.java.net/browse/JDK-8266074 > > Which has also caused related test issues:

RFR: 8264766: ClassCastException during template compilation (Variable can not be cast to Param)

2021-06-07 Thread Joe Wang
Fixes the addVariable/addParam methods in the SymbolTable to check types before casting. - Commit messages: - 8264766: ClassCastException during template compilation (Variable cannot be cast to Param) Changes: https://git.openjdk.java.net/jdk/pull/4398/files Webrev: https://webre

Re: RFR: 8195129: System.load() fails to load from unicode paths [v3]

2021-06-07 Thread Naoto Sato
On Sun, 6 Jun 2021 22:25:44 GMT, David Holmes wrote: >> I think we need to establish some common ground before proceeding further >> with this fix. It's a bit of a long read; please, bear with me. >> >> The path name starts its life as a `jstring` in >> `Java_jdk_internal_loader_NativeLibrarie

Integrated: 8268296: ScopedMemoryAccess build error with readonly filesystems

2021-06-07 Thread Liam Miller-Cushon
On Sun, 6 Jun 2021 20:09:32 GMT, Liam Miller-Cushon wrote: > This change fixes a build error during the generation of > `ScopedMemoryAccess.java` when the sources are readonly, by using `cat a > b` > instead of `cp a b` to avoid propagating the permissions to the generated > source. This pull

Re: RFR: 8268083: JDK-8267706 breaks bin/idea.sh on a Mac

2021-06-07 Thread Erik Joelsson
On Fri, 4 Jun 2021 21:23:27 GMT, Nikita Gubarkov wrote: > I got rid of `realpath` usage as discussed in > https://github.com/openjdk/jdk/pull/4190 and used `RelativePath` macro > instead, however there were quite a few problems with this macro, here's the > example: > > $(call RelativePath,/

Integrated: 8191441: (Process) add Readers and Writer access to java.lang.Process streams

2021-06-07 Thread Roger Riggs
On Thu, 20 May 2021 19:57:22 GMT, Roger Riggs wrote: > Methods are added to java.lang.Process to read and write characters and lines > from and to a spawned Process. > The Charset used to encode and decode characters to bytes can be specified or > use the > operating system native encoding as i

Re: RFR: 8268339: Upstream: 8267989: Exceptions thrown during upcalls should be handled (Pt. 2)

2021-06-07 Thread Jorn Vernee
On Mon, 7 Jun 2021 16:38:01 GMT, Jorn Vernee wrote: > Hi, > > This is part 2 of a two part upstreaming process of the patch mentioned in > the subject line. The patch was split into 2 in order to document 2 separate > specification changes that arose from a change in the implementation, with 2

RFR: 8268339: Upstream: 8267989: Exceptions thrown during upcalls should be handled (Pt. 2)

2021-06-07 Thread Jorn Vernee
Hi, This is part 2 of a two part upstreaming process of the patch mentioned in the subject line. The patch was split into 2 in order to document 2 separate specification changes that arose from a change in the implementation, with 2 separate CSRs. The first patch can be found here: https://git

Withdrawn: 8265039: Adjust javadoc for ByteArray*Stream and InputStream

2021-06-07 Thread duke
On Mon, 5 Apr 2021 08:37:15 GMT, Сергей Цыпанов wrote: > Hello, > > to avoid cases detected in > [https://github.com/openjdk/jdk/pull/2992](https://github.com/openjdk/jdk/pull/2992) > I propose to modify JavaDoc of `ByteArray*Stream` to explicitly mention > redundancy of wrapping with `Buff

Re: RFR: 8195129: System.load() fails to load from unicode paths [v5]

2021-06-07 Thread Maxim Kartashev
On Fri, 4 Jun 2021 13:36:27 GMT, Maxim Kartashev wrote: >> Character strings within JVM are produced and consumed in several formats. >> Strings come from/to Java in the UTF8 format and POSIX APIs (like fprintf() >> or dlopen()) consume strings also in UTF8. On Windows, however, the >> situat

Re: RFR: 8268250: Class.arrayType() for a 255-d array throws undocumented IllegalArgumentException [v2]

2021-06-07 Thread Joe Darcy
Hi Alan, On 6/6/2021 11:01 PM, Alan Bateman wrote: On Mon, 7 Jun 2021 00:22:41 GMT, Joe Darcy wrote: Make explicit illegal argument cases of Class.arrayType. Please also review the corresponding CSR: https://bugs.openjdk.java.net/browse/JDK-8268300 Joe Darcy has updated the pull request in

Re: javac throws an AssertionError while compiling a switch on types

2021-06-07 Thread Jan Lahoda
Thanks for the report, Remi. I believe the specification currently allows this (default does not have to be last, and does not dominate anything), so javac should be able to handle this code. I've filled: https://bugs.openjdk.java.net/browse/JDK-8268333 Jan On 07. 06. 21 11:54, Remi Fora

Re: Pattern matching, not informative error message when the binding name is missing

2021-06-07 Thread Jan Lahoda
Hi Remi, Thanks. I've filled: https://bugs.openjdk.java.net/browse/JDK-8268320 FWIW, I think compiler-dev is a better place for reports like this. Jan On 07. 06. 21 11:03, Remi Forax wrote: Hi all, with this code sealed interface Vehicle {} record Car(String owner, String color) im

RFR: 8268328: Upstream: 8267989: Exceptions thrown during upcalls should be handled (Pt. 1)

2021-06-07 Thread Jorn Vernee
Hi, This is part 1 of a two part upstreaming process of the patch mentioned in the subject line. The patch was split into 2 in order to document 2 separate specification changes that arose from a change in the implementation, with 2 separate CSRs. This patch changes the handling of method hand

Re: RFR: 8268327: Upstream: 8268169: The system lookup can not find stdio functions such as printf on Windows 10

2021-06-07 Thread Athijegannathan Sundararajan
On Mon, 7 Jun 2021 13:23:46 GMT, Jorn Vernee wrote: > Hi, > > The documentation of `CLinker::systemLookup` [1] says this: > > > * Obtains a system lookup which is suitable to find symbols in the standard C > libraries. > > > However, currently it is not possible to look up common stdio.h s

Re: RFR: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS [v5]

2021-06-07 Thread Henry Jen
On Mon, 7 Jun 2021 03:18:32 GMT, Henry Jen wrote: >> …d on macOS >> >> This patch simply round up the specified stack size to multiple of the >> system page size. >> >> Test is trivial, simply run java with -Xss option against following code. On >> MacOS, before the fix, running with `-Xss15

Re: case null vs case dominance

2021-06-07 Thread forax
- Mail original - > De: "Brian Goetz" > À: "Remi Forax" , "core-libs-dev" > > Cc: "amber-spec-experts" > Envoyé: Lundi 7 Juin 2021 17:06:20 > Objet: Re: case null vs case dominance > On 6/7/2021 5:51 AM, Remi Forax wrote: >> Hi all, >> the first part of the message is about javac error

Re: case null vs case dominance

2021-06-07 Thread Brian Goetz
On 6/7/2021 5:51 AM, Remi Forax wrote: Hi all, the first part of the message is about javac error message that could be improved, the second part is about the current spec being not very logical. With this code Object o = null; var value = switch(o) { //case null -> 0;

Re: RFR: 8268327: Upstream: 8268169: The system lookup can not find stdio functions such as printf on Windows 10

2021-06-07 Thread Erik Joelsson
On Mon, 7 Jun 2021 13:23:46 GMT, Jorn Vernee wrote: > Hi, > > The documentation of `CLinker::systemLookup` [1] says this: > > > * Obtains a system lookup which is suitable to find symbols in the standard C > libraries. > > > However, currently it is not possible to look up common stdio.h s

RFR: 8268327: Upstream: 8268169: The system lookup can not find stdio functions such as printf on Windows 10

2021-06-07 Thread Jorn Vernee
Hi, The documentation of `CLinker::systemLookup` [1] says this: * Obtains a system lookup which is suitable to find symbols in the standard C libraries. However, currently it is not possible to look up common stdio.h symbols, such as `printf`, using the system lookup on Windows 10. This is

Re: RFR: 8268276: Base64 Decoding optimization for x86 using AVX-512 [v2]

2021-06-07 Thread Scott Gibbons
> Add the Base64 Decode intrinsic for x86 to utilize AVX-512 for acceleration. > Also allows for performance improvement for non-AVX-512 enabled platforms. > Due to the nature of MIME-encoded inputs, modify the intrinsic signature to > accept an additional parameter (isMIME) for fast-path MIME d

Re: RFR: 8268296: ScopedMemoryAccess build error with readonly filesystems

2021-06-07 Thread Erik Joelsson
On Sun, 6 Jun 2021 20:09:32 GMT, Liam Miller-Cushon wrote: > This change fixes a build error during the generation of > `ScopedMemoryAccess.java` when the sources are readonly, by using `cat a > b` > instead of `cp a b` to avoid propagating the permissions to the generated > source. Looks goo

Re: RFR: 8268276: Base64 Decoding optimization for x86 using AVX-512

2021-06-07 Thread Erik Joelsson
On Fri, 4 Jun 2021 20:55:51 GMT, Scott Gibbons wrote: > Add the Base64 Decode intrinsic for x86 to utilize AVX-512 for acceleration. > Also allows for performance improvement for non-AVX-512 enabled platforms. > Due to the nature of MIME-encoded inputs, modify the intrinsic signature to > acc

Re: RFR: 8240349: jlink --vm with not present VM does not fail fast

2021-06-07 Thread Jim Laskey
On Mon, 7 Jun 2021 11:00:00 GMT, Athijegannathan Sundararajan wrote: > jlink should clean up output directory on any failure. should not leave > partially filled output. Marked as reviewed by jlaskey (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/4386

RFR: 8240349: jlink --vm with not present VM does not fail fast

2021-06-07 Thread Athijegannathan Sundararajan
jlink should clean up output directory on any failure. should not leave partially filled output. - Commit messages: - 8240349: jlink --vm with not present VM does not fail fast Changes: https://git.openjdk.java.net/jdk/pull/4386/files Webrev: https://webrevs.openjdk.java.net/?repo

Re: RFR: 8195129: System.load() fails to load from unicode paths [v3]

2021-06-07 Thread Maxim Kartashev
On Sun, 6 Jun 2021 22:25:44 GMT, David Holmes wrote: >> I think we need to establish some common ground before proceeding further >> with this fix. It's a bit of a long read; please, bear with me. >> >> The path name starts its life as a `jstring` in >> `Java_jdk_internal_loader_NativeLibrarie

javac throws an AssertionError while compiling a switch on types

2021-06-07 Thread Remi Forax
Hi all, javac does like this code, there is a check missing because javac should not reach Gen with a code like this. Object o = null; var value = switch(o) { default -> 0; case String s -> 0; }; System.out.println(value); An exception has occurred in the comp

case null vs case dominance

2021-06-07 Thread Remi Forax
Hi all, the first part of the message is about javac error message that could be improved, the second part is about the current spec being not very logical. With this code Object o = null; var value = switch(o) { //case null -> 0; case Object __ -> 0; case n

Pattern matching, not informative error message when the binding name is missing

2021-06-07 Thread Remi Forax
Hi all, with this code sealed interface Vehicle {} record Car(String owner, String color) implements Vehicle {} record Bus(String owner) implements Vehicle {} public static void example3() { var vehicles = List.of( new Car("Bob", "red"), new Bus("Ana") ); var t

Pattern matching - exhaustiveness is botched

2021-06-07 Thread Remi Forax
I don't know if you know but using the latest version of the source, this code does not compile. sealed interface Vehicle {} record Car(String owner, String color) implements Vehicle {} record Bus(String owner) implements Vehicle {} public static void example2() { var vehicles = List.

Integrated: 8262891: Compiler implementation for Pattern Matching for switch (Preview)

2021-06-07 Thread Jan Lahoda
On Tue, 4 May 2021 16:41:44 GMT, Jan Lahoda wrote: > This is a preview of a patch implementing JEP 406: Pattern Matching for > switch (Preview): > https://bugs.openjdk.java.net/browse/JDK-8213076 > > The current draft of the specification is here: > http://cr.openjdk.java.net/~gbierman/jep406/j