Re: RFR: JDK-8298448: UndefinedBehaviorSanitizer [v8]

2022-12-12 Thread David Holmes
On Mon, 12 Dec 2022 10:42:22 GMT, Justin King wrote: >> Allow building OpenJDK with UBSan. Currently the build fails when optimizing >> the image due to lots of undefined behavior (it invokes the built JVM). >> Follow up PRs will either replace the undefined behavior with well defined >> behav

Re: RFR: 8290899: java/lang/String/StringRepeat.java test requests too much heap on windows x86

2022-12-12 Thread Jaikiran Pai
On Tue, 13 Dec 2022 00:06:00 GMT, Sergey Bylokhov wrote: > The `java/lang/String/StringRepeat.java` test was updated twice after > integration: > > https://bugs.openjdk.org/browse/JDK-8221400 - the xmx4g was replaced by the > xmx2g > https://bugs.openjdk.org/browse/JDK-8265421 - the "os.maxMem

Re: RFR: 8290899: java/lang/String/StringRepeat.java test requests too much heap on windows x86

2022-12-12 Thread Sergey Bylokhov
On Tue, 13 Dec 2022 04:54:44 GMT, Jaikiran Pai wrote: > Hello Sergey, the linked JBS issues note that this test takes at most 1400M. > Should there be some investigation into why it's failing even with 2GB > allowance? On windows x86 java fails even before the start of the test, it is just im

Re: RFR: 8290899: java/lang/String/StringRepeat.java test requests too much heap on windows x86

2022-12-12 Thread Jaikiran Pai
On Tue, 13 Dec 2022 00:06:00 GMT, Sergey Bylokhov wrote: > The `java/lang/String/StringRepeat.java` test was updated twice after > integration: > > https://bugs.openjdk.org/browse/JDK-8221400 - the xmx4g was replaced by the > xmx2g > https://bugs.openjdk.org/browse/JDK-8265421 - the "os.maxMem

Re: RFR: 8298416: Console should be declared `sealed`

2022-12-12 Thread Jaikiran Pai
On Fri, 9 Dec 2022 20:14:53 GMT, Naoto Sato wrote: > `Console` class now has a couple of internal subclasses within `java.io` > package. It should be `sealed` and subclasses be declared in the `permits` > clause. The implementation resided in `Console` class is separated into > `ConsoleImpl` c

Re: RFR: 8298416: Console should be declared `sealed`

2022-12-12 Thread Jaikiran Pai
On Fri, 9 Dec 2022 20:14:53 GMT, Naoto Sato wrote: > `Console` class now has a couple of internal subclasses within `java.io` > package. It should be `sealed` and subclasses be declared in the `permits` > clause. The implementation resided in `Console` class is separated into > `ConsoleImpl` c

RFR: 8290899: java/lang/String/StringRepeat.java test requests too much heap on windows x86

2022-12-12 Thread Sergey Bylokhov
The `java/lang/String/StringRepeat.java` test was updated twice after integration: https://bugs.openjdk.org/browse/JDK-8221400 - the xmx4g was replaced by the xmx2g https://bugs.openjdk.org/browse/JDK-8265421 - the "os.maxMemory >= 2G" was added Unfortunately, this test still may fail on Window

Re: RFR: JDK-8298448: UndefinedBehaviorSanitizer [v3]

2022-12-12 Thread Justin King
On Tue, 13 Dec 2022 00:37:42 GMT, David Holmes wrote: >> Primarily, but its not a requirement. We should also be able to invoke >> `java` as is. The environment variables should be used to force specific >> behavior for a single invocation. Otherwise, if one forgets to pass the >> environment

Re: RFR: JDK-8298448: UndefinedBehaviorSanitizer [v3]

2022-12-12 Thread David Holmes
On Mon, 12 Dec 2022 08:04:57 GMT, Justin King wrote: >> src/java.base/share/native/launcher/main.c line 41: >> >>> 39: // extremely early during library loading, before main is called. We >>> need to override the default >>> 40: // options because by default UBSan only prints a warning for each

RFR: 8298416: Console should be declared `sealed`

2022-12-12 Thread Naoto Sato
`Console` class now has a couple of internal subclasses within `java.io` package. It should be `sealed` and subclasses be declared in the `permits` clause. - Commit messages: - tidying up - sealed Console, impl/if separation Changes: https://git.openjdk.org/jdk/pull/11615/files

[jdk20] Integrated: 8298488: [macos13] tools/jpackage tests failing with "Exit code: 137" on macOS

2022-12-12 Thread Alexander Matveev
On Mon, 12 Dec 2022 21:23:50 GMT, Alexander Matveev wrote: > This issue is similar to JDK-8277493. Looks like macOS 13 cannot execute > unsigned code and code should be at least ad hoc signed. Same as for macOS > aarch64. Fixed by enabling ad hoc signing for macOS platform for both x64 and >

Re: [jdk20] RFR: 8298488: [macos13] tools/jpackage tests failing with "Exit code: 137" on macOS

2022-12-12 Thread Alexey Semenyuk
On Mon, 12 Dec 2022 21:23:50 GMT, Alexander Matveev wrote: > This issue is similar to JDK-8277493. Looks like macOS 13 cannot execute > unsigned code and code should be at least ad hoc signed. Same as for macOS > aarch64. Fixed by enabling ad hoc signing for macOS platform for both x64 and >

[jdk20] RFR: 8298488: [macos13] tools/jpackage tests failing with "Exit code: 137" on macOS

2022-12-12 Thread Alexander Matveev
This issue is similar to JDK-8277493. Looks like macOS 13 cannot execute unsigned code and code should be at least ad hoc signed. Same as for macOS aarch64. Fixed by enabling ad hoc signing for macOS platform for both x64 and aarch64. - Commit messages: - 8298488: [macos13] tools/

Re: RFR: 8283660: Convert com/sun/jndi/ldap/AbstractLdapNamingEnumeration.java finalizer to Cleaner [v16]

2022-12-12 Thread Brent Christian
On Fri, 22 Jul 2022 20:51:59 GMT, Brent Christian wrote: >> Please review this change to replace the finalizer in >> `AbstractLdapNamingEnumeration` with a Cleaner. >> >> The pieces of state required for cleanup (`LdapCtx homeCtx`, `LdapResult >> res`, and `LdapClient enumClnt`) are moved to a

Re: RFR: 8293667: Align jlink's --compress option with jmod's --compress option [v2]

2022-12-12 Thread Ian Graves
> This is an approach to adding a flag to jlink that will allow --compress to > take the same types of arguments as jmod, thus bringing the two into > alignment. This likely requires a CSR and a discussion on whether we should > deprecate or simply remove the original numeric compression argumen

Re: [jdk20] RFR: 8295857: Clarify that cleanup code can be skipped when the JVM terminates (e.g. when calling halt())

2022-12-12 Thread Iris Clark
On Mon, 12 Dec 2022 19:51:22 GMT, Brent Christian wrote: > Backport [8295857](https://bugs.openjdk.org/browse/JDK-8295857) to jdk20 Changes appear to be identical to those in JDK 21. - Marked as reviewed by iris (Reviewer). PR: https://git.openjdk.org/jdk20/pull/19

[jdk20] Integrated: 8297288: Example code in Scanner class

2022-12-12 Thread Naoto Sato
On Fri, 9 Dec 2022 18:32:37 GMT, Naoto Sato wrote: > The example in `Scanner` directly uses `System.in` which may cause unwanted > behavior when the default charset and the console charset differ. Using > `Console.reader()` is more appropriate. Also changed examples into snippets. This pull re

[jdk20] RFR: 8295857: Clarify that cleanup code can be skipped when the JVM terminates (e.g. when calling halt())

2022-12-12 Thread Brent Christian
Backport [8295857](https://bugs.openjdk.org/browse/JDK-8295857) to jdk20 - Commit messages: - Backport c7aca73177339f931f7dfb6627365548a32874f7 Changes: https://git.openjdk.org/jdk20/pull/19/files Webrev: https://webrevs.openjdk.org/?repo=jdk20&pr=19&range=00 Issue: https://bugs.

Integrated: 8295857: Clarify that cleanup code can be skipped when the JVM terminates (e.g. when calling halt())

2022-12-12 Thread Brent Christian
On Thu, 17 Nov 2022 19:25:42 GMT, Brent Christian wrote: > [JDK-8290036](https://bugs.openjdk.org/browse/JDK-8290036) documented the > shutdown sequence, noting that calling Runtime.halt() skips the shutdown > sequence and immediately terminates the VM. Thus, "threads' current methods > do not

RFR: Merge jdk20

2022-12-12 Thread Jesper Wilhelmsson
Forwardport JDK 20 -> JDK 21 - Commit messages: - Merge remote-tracking branch 'jdk20/master' into Merge_jdk20 - 8297288: Example code in Scanner class - 8298271: java/security/SignedJar/spi-calendar-provider/TestSPISigned.java failing on Windows - 8298459: Fix msys2 linking and

RFR: 8298590: Refactor LambdaForm constructors

2022-12-12 Thread Jorn Vernee
Refactor LambdaForm constructors into static factories. In the new code, there's only 1 constructor, which simply initializes all fields. Multiple factory methods are built on top of this, which add various argument validation/pre-processing and post processing of the constructed lambda forms.

Re: RFR: 8298532: Declare private constructors for FFM internal Architecture implementations

2022-12-12 Thread Jorn Vernee
On Mon, 12 Dec 2022 08:37:02 GMT, Per Minborg wrote: > This PR proposes declaring `AArch64Architecture` and `X86_64Architecture` > `final` and creating a `private` constructor so that this redundant byte code > can be eliminated: > > > public jdk.internal.foreign.abi.x64.X86_64Architecture()

Re: [jdk20] RFR: 8297288: Example code in Scanner class [v2]

2022-12-12 Thread Naoto Sato
On Sat, 10 Dec 2022 08:15:49 GMT, Alan Bateman wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Modified @link comment in the snippet > > src/java.base/share/classes/java/util/Scanner.java line 58: > >> 56: * va

Re: [jdk20] RFR: 8297288: Example code in Scanner class [v2]

2022-12-12 Thread Alan Bateman
On Mon, 12 Dec 2022 17:11:54 GMT, Naoto Sato wrote: >> The example in `Scanner` directly uses `System.in` which may cause unwanted >> behavior when the default charset and the console charset differ. Using >> `Console.reader()` is more appropriate. Also changed examples into snippets. > > Naoto

Re: [jdk20] RFR: 8297288: Example code in Scanner class [v2]

2022-12-12 Thread Naoto Sato
> The example in `Scanner` directly uses `System.in` which may cause unwanted > behavior when the default charset and the console charset differ. Using > `Console.reader()` is more appropriate. Also changed examples into snippets. Naoto Sato has updated the pull request incrementally with one ad

Integrated: 8298567: Make field in RandomAccessFile final

2022-12-12 Thread Per Minborg
On Mon, 12 Dec 2022 12:48:47 GMT, Per Minborg wrote: > This PR proposes making a field in `RandomAccessFile` final. Also, it > modernises a switch statement. This pull request has now been integrated. Changeset: 81f57d56 Author:Per Minborg Committer: Roger Riggs URL: https://git.o

Re: RFR: 8298567: Make field in RandomAccessFile final [v3]

2022-12-12 Thread Per Minborg
> This PR proposes making a field in `RandomAccessFile` final. Also, it > modernises a switch statement. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Remove redundant check - Changes: - all: https://git.openjdk.org/

Re: jdeps - option to to analyze package-private API

2022-12-12 Thread Alan Bateman
On 03/12/2022 18:15, Matej Turcel wrote: : So far, jdeps with the --api-only flag seems like the perfect tool, except there is a little problem -- we have packages (dozens of them) which exist in multiple modules. For example, package `com.foo` exists in three separate modules (meaning each of

Re: RFR: 8298567: Make field in RandomAccessFile final [v2]

2022-12-12 Thread Chris Hegarty
On Mon, 12 Dec 2022 14:26:40 GMT, Per Minborg wrote: >> This PR proposes making a field in `RandomAccessFile` final. Also, it >> modernises a switch statement. > > Per Minborg has updated the pull request incrementally with one additional > commit since the last revision: > > Make the field

Re: RFR: 8298567: Make field in RandomAccessFile final [v2]

2022-12-12 Thread Roger Riggs
On Mon, 12 Dec 2022 14:26:40 GMT, Per Minborg wrote: >> This PR proposes making a field in `RandomAccessFile` final. Also, it >> modernises a switch statement. > > Per Minborg has updated the pull request incrementally with one additional > commit since the last revision: > > Make the field

Re: RFR: 8298567: Make field in RandomAccessFile final [v2]

2022-12-12 Thread Per Minborg
> This PR proposes making a field in `RandomAccessFile` final. Also, it > modernises a switch statement. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Make the field rw final - Changes: - all: https://git.openjdk.org

Re: RFR: 8293667: Align jlink's --compress option with jmod's --compress option

2022-12-12 Thread Alan Bateman
On Fri, 9 Dec 2022 21:42:15 GMT, Ian Graves wrote: > This is an approach to adding a flag to jlink that will allow --compress to > take the same types of arguments as jmod, thus bringing the two into > alignment. This likely requires a CSR and a discussion on whether we should > deprecate or s

Re: RFR: 8298567: Make field in RandomAccessFile final

2022-12-12 Thread Alan Bateman
On Mon, 12 Dec 2022 12:48:47 GMT, Per Minborg wrote: > This PR proposes making a field in `RandomAccessFile` final. Also, it > modernises a switch statement. Surprising that RandomAccessFile.fd was not changed to final many years ago. We can do rw at the same time. - PR: https://

RFR: 8298567: Make field in RandomAccessFile final

2022-12-12 Thread Per Minborg
This PR proposes making a field in `RandomAccessFile` final. Also, it modernises a switch statement. - Commit messages: - Reclare field final and modernize switch Changes: https://git.openjdk.org/jdk/pull/11632/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11632&range=00

Re: RFR: 8205592: BigDecimal.doubleValue() is depressingly slow

2022-12-12 Thread Raffaello Giulietti
On Thu, 7 Jul 2022 15:20:32 GMT, Raffaello Giulietti wrote: > A reimplementation of `BigDecimal.[double|float]Value()` to enhance > performance, avoiding an intermediate string and its subsequent parsing on > the slow path. waiting for review - PR: https://git.openjdk.org/jdk/pu

Re: RFR: JDK-8298448: UndefinedBehaviorSanitizer [v3]

2022-12-12 Thread Justin King
On Mon, 12 Dec 2022 09:58:54 GMT, Justin King wrote: >> src/java.base/share/native/launcher/main.c line 49: >> >>> 47: #endif // UNDEFINED_BEHAVIOR_SANITIZER >>> 48: >>> 49: /* >> >> As I said we have more launcher than 'java', if you put this method here you >> must put it in all launchers.

Re: RFR: JDK-8298448: UndefinedBehaviorSanitizer [v8]

2022-12-12 Thread Justin King
> Allow building OpenJDK with UBSan. Currently the build fails when optimizing > the image due to lots of undefined behavior (it invokes the built JVM). > Follow up PRs will either replace the undefined behavior with well defined > behavior or suppress errors which are intentional. The goal is t

Re: RFR: JDK-8298448: UndefinedBehaviorSanitizer [v7]

2022-12-12 Thread Justin King
> Allow building OpenJDK with UBSan. Currently the build fails when optimizing > the image due to lots of undefined behavior (it invokes the built JVM). > Follow up PRs will either replace the undefined behavior with well defined > behavior or suppress errors which are intentional. The goal is t

Re: RFR: JDK-8298448: UndefinedBehaviorSanitizer [v6]

2022-12-12 Thread Justin King
On Mon, 12 Dec 2022 09:50:33 GMT, Justin King wrote: >> Allow building OpenJDK with UBSan. Currently the build fails when optimizing >> the image due to lots of undefined behavior (it invokes the built JVM). >> Follow up PRs will either replace the undefined behavior with well defined >> behav

Re: RFR: JDK-8298448: UndefinedBehaviorSanitizer [v3]

2022-12-12 Thread Justin King
On Mon, 12 Dec 2022 08:14:51 GMT, Robbin Ehn wrote: >> Justin King has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add comment explaining __ubsan_default_options and UBSAN_OPTIONS >> >> Signed-off-by: Justin King > > src/java.base/

Re: RFR: JDK-8298448: UndefinedBehaviorSanitizer [v6]

2022-12-12 Thread Justin King
> Allow building OpenJDK with UBSan. Currently the build fails when optimizing > the image due to lots of undefined behavior (it invokes the built JVM). > Follow up PRs will either replace the undefined behavior with well defined > behavior or suppress errors which are intentional. The goal is t

Re: RFR: JDK-8298448: UndefinedBehaviorSanitizer [v5]

2022-12-12 Thread Justin King
> Allow building OpenJDK with UBSan. Currently the build fails when optimizing > the image due to lots of undefined behavior (it invokes the built JVM). > Follow up PRs will either replace the undefined behavior with well defined > behavior or suppress errors which are intentional. The goal is t

Re: RFR: JDK-8298448: UndefinedBehaviorSanitizer [v4]

2022-12-12 Thread Justin King
> Allow building OpenJDK with UBSan. Currently the build fails when optimizing > the image due to lots of undefined behavior (it invokes the built JVM). > Follow up PRs will either replace the undefined behavior with well defined > behavior or suppress errors which are intentional. The goal is t

RFR: 8298532: Declare private constructors for FFM internal Architecture implementations

2022-12-12 Thread Per Minborg
This PR proposes declaring `AArch64Architecture` and `X86_64Architecture` `final` and creating a `private` constructor so that this redundant byte code can be eliminated: public jdk.internal.foreign.abi.x64.X86_64Architecture(); Code: 0: aload_0 1: invokespecial #1 // Meth

Re: RFR: JDK-8298448: UndefinedBehaviorSanitizer [v3]

2022-12-12 Thread Robbin Ehn
On Mon, 12 Dec 2022 07:02:04 GMT, Justin King wrote: >> Allow building OpenJDK with UBSan. Currently the build fails when optimizing >> the image due to lots of undefined behavior (it invokes the built JVM). >> Follow up PRs will either replace the undefined behavior with well defined >> behav

Withdrawn: JDK-8298476: Unseal FinalReference

2022-12-12 Thread Bernhard Urban-Forster
On Fri, 9 Dec 2022 14:17:24 GMT, Bernhard Urban-Forster wrote: > The change in [JDK-8283415](https://bugs.openjdk.org/browse/JDK-8283415) made > use of the now available `sealed` keyword for `FinalReference`. > > Unfortunately this introduced a problem for the Espresso VM (Java on > Truffle):

Re: RFR: JDK-8298476: Unseal FinalReference

2022-12-12 Thread Bernhard Urban-Forster
On Fri, 9 Dec 2022 17:40:49 GMT, Alan Bateman wrote: >> The change in [JDK-8283415](https://bugs.openjdk.org/browse/JDK-8283415) >> made use of the now available `sealed` keyword for `FinalReference`. >> >> Unfortunately this introduced a problem for the Espresso VM (Java on >> Truffle): Since

Re: RFR: JDK-8298448: UndefinedBehaviorSanitizer [v3]

2022-12-12 Thread Justin King
On Mon, 12 Dec 2022 07:26:21 GMT, David Holmes wrote: >> Justin King has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add comment explaining __ubsan_default_options and UBSAN_OPTIONS >> >> Signed-off-by: Justin King > > src/java.bas