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

2022-12-13 Thread Justin King
On Tue, 13 Dec 2022 16:55:09 GMT, Robbin Ehn wrote: > > I guess the advantage to putting this in the build machinery (as opposed to > > using `--with-extra-cflags=-fsanitize=undefined > > --with-extra-ldflags=-fsanitize=undefined`) is that we can turn some of > > these onn by default once

Re: RFR: 8295044: Implementation of Foreign Function and Memory API (Second Preview) [v39]

2022-12-13 Thread Michael Ennen
On Mon, 5 Dec 2022 13:46:09 GMT, Maurizio Cimadamore wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix Preview annotation for JEP 434 > > Note: there are 4 tests failing in x86: > *

Boilerplate to add a new module

2022-12-13 Thread Ethan McCue
Hey all, I'm doodling on JEP-198, and I was wondering if anyone had a line on the boilerplate needed to add a new module to the build. Just adding src/ java.json/ share/ classes/ module-info.java java/ json/ Json.java ... was enough

Re: RFR: 8298416: Console should be declared `sealed` [v2]

2022-12-13 Thread Jaikiran Pai
On Tue, 13 Dec 2022 18:42:53 GMT, Naoto Sato wrote: >> src/java.base/share/classes/java/io/Console.java line 108: >> >>> 106: public PrintWriter writer() { >>> 107: throw new UnsupportedOperationException( >>> 108: "Console class itself does not provide >>>

Re: RFR: 8298416: Console should be declared `sealed` [v2]

2022-12-13 Thread Jaikiran Pai
On Tue, 13 Dec 2022 18:29:31 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 >>

Re: RFR: 8298638: Cleanup of unix java_md.c for better re-exec handling

2022-12-13 Thread David Holmes
On Tue, 13 Dec 2022 09:32:11 GMT, Dmitry Samersoff wrote: > Move "unix" java_md.c cleanup, which is the prerequisites for the fix for > JDK-8293806 (PR https://github.com/openjdk/jdk/pull/11538), to a separate PR. > > @AlanBateman, @dholmes-ora please, take a look to the changes. I'm okay

Re: RFR: 8298639: Perform I/O operations in bulk for RandomAccessFile [v2]

2022-12-13 Thread Alan Bateman
On Tue, 13 Dec 2022 09:27:24 GMT, Per Minborg wrote: >> This PR suggests improving performance for read and write operations for the >> longer primitives in `RandomAccessFile`. >> >> These improvements would also propagate to other JDK classes relying on >> these improved `RandomAccessFile`

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

2022-12-13 Thread Brent Christian
On Mon, 12 Dec 2022 19:51:22 GMT, Brent Christian wrote: > Backport [8295857](https://bugs.openjdk.org/browse/JDK-8295857) to jdk20 This pull request has now been integrated. Changeset: bf78f716 Author:Brent Christian URL:

Re: RFR: 8298416: Console should be declared `sealed` [v2]

2022-12-13 Thread Naoto Sato
On Tue, 13 Dec 2022 04:36:24 GMT, Jaikiran Pai wrote: >> Naoto Sato 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: 8298416: Console should be declared `sealed` [v2]

2022-12-13 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. The implementation resided in `Console` class is separated into > `ConsoleImpl` class. Naoto Sato has updated the pull request with

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

2022-12-13 Thread Erik Joelsson
On Tue, 13 Dec 2022 13:45:04 GMT, Justin King wrote: > Nope. Some targets end up passing C++ flags to the C compiler, causing a > failure. Ah right, we (mis)use CFLAGS (instead of CXXFLAGS) in some SetupNativeCompilation calls when all source files are C++. In that case, your suggested patch

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

2022-12-13 Thread Robbin Ehn
On Tue, 13 Dec 2022 16:29:59 GMT, Justin King wrote: > I guess the advantage to putting this in the build machinery (as opposed to > using `--with-extra-cflags=-fsanitize=undefined > --with-extra-ldflags=-fsanitize=undefined`) is that we can turn some of these > onn by default once we've

Integrated: Merge jdk20

2022-12-13 Thread Jesper Wilhelmsson
On Tue, 13 Dec 2022 13:55:12 GMT, Jesper Wilhelmsson wrote: > Forwardport JDK 20 -> JDK 21 This pull request has now been integrated. Changeset: 23e18275 Author:Jesper Wilhelmsson URL: https://git.openjdk.org/jdk/commit/23e18275ac2a7297ba806a1835fabb7141949967 Stats: 181 lines

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

2022-12-13 Thread Justin King
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 >>

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

2022-12-13 Thread Matej Turcel
On 12.12.2022 16:26, Alan Bateman wrote: The scenario seems a bit unusual in that API elements with package access aren't usually considered to be part of the API. Yes, they shouldn't be. But our code is not perfect and we have many cases where package-private elements de-facto are a part of

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

2022-12-13 Thread Andrew Haley
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 >>

RFR: Merge jdk20

2022-12-13 Thread Jesper Wilhelmsson
Forwardport JDK 20 -> JDK 21 - Commit messages: - Merge remote-tracking branch 'jdk20/master' into Merge_jdk20 - 8298084: Memory leak in Method::build_profiling_method_data - 8296955: Kitchensink.java failed with "double free or corruption (!prev): " - 8298488: [macos13]

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

2022-12-13 Thread Justin King
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 >>

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

2022-12-13 Thread Erik Joelsson
On Tue, 13 Dec 2022 08:17:09 GMT, Justin King wrote: > I tried to use a single file, but the build logic attempts to compile as > either C or C++ based on file extensions, and has logic based on it. So if I > use `.cpp` and the target is all `.c` odd things happen. The same for the > inverse.

Withdrawn: Merge jdk20

2022-12-13 Thread Jesper Wilhelmsson
On Mon, 12 Dec 2022 18:49:49 GMT, Jesper Wilhelmsson wrote: > Forwardport JDK 20 -> JDK 21 This pull request has been closed without being integrated. - PR: https://git.openjdk.org/jdk/pull/11637

Re: RFR: [DRAFT] 8294982: Implementation of Classfile API [v4]

2022-12-13 Thread Adam Sotona
> **This pull request is not intended for immediate integration to JDK > mainline.** > > This is root pull request with Classfile API implementation, tests and > benchmarks initial drop into JDK. > > Following pull requests consolidating JDK class files parsing, generating, > and transforming

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

2022-12-13 Thread Per Minborg
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

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

2022-12-13 Thread Per Minborg
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

Re: RFR: 8298639: Perform I/O operations in bulk for RandomAccessFile [v2]

2022-12-13 Thread Sergey Tsypanov
On Tue, 13 Dec 2022 09:27:24 GMT, Per Minborg wrote: >> This PR suggests improving performance for read and write operations for the >> longer primitives in `RandomAccessFile`. >> >> These improvements would also propagate to other JDK classes relying on >> these improved `RandomAccessFile`

RFR: 8298638: Cleanup of unix java_md.c for better re-exec handling

2022-12-13 Thread Dmitry Samersoff
Move "unix" java_md.c cleanup, which is the prerequisites for the fix for JDK-8293806 (PR https://github.com/openjdk/jdk/pull/11538), to a separate PR. @AlanBateman, @dholmes-ora please, take a look to the changes. - Commit messages: - 8298638: Cleanup of unix java_md.c for better

Re: RFR: 8298639: Perform I/O operations in bulk for RandomAccessFile [v2]

2022-12-13 Thread Sergey Tsypanov
On Tue, 13 Dec 2022 09:27:24 GMT, Per Minborg wrote: >> This PR suggests improving performance for read and write operations for the >> longer primitives in `RandomAccessFile`. >> >> These improvements would also propagate to other JDK classes relying on >> these improved `RandomAccessFile`

Re: RFR: 8298639: Perform I/O operations in bulk for RandomAccessFile

2022-12-13 Thread Alan Bateman
On Tue, 13 Dec 2022 09:11:10 GMT, Per Minborg wrote: > This PR suggests improving performance for read and write operations for the > longer primitives in `RandomAccessFile`. > > These improvements would also propagate to other JDK classes relying on these > improved `RandomAccessFile`

Re: RFR: 8298639: Perform I/O operations in bulk for RandomAccessFile [v2]

2022-12-13 Thread Per Minborg
> This PR suggests improving performance for read and write operations for the > longer primitives in `RandomAccessFile`. > > These improvements would also propagate to other JDK classes relying on these > improved `RandomAccessFile` operations. Per Minborg has updated the pull request with a

RFR: 8298639: Perform I/O operations in bulk for RandomAccessFile

2022-12-13 Thread Per Minborg
This PR suggests improving performance for read and write operations for the longer primitives in `RandomAccessFile`. These improvements would also propagate to other JDK classes relying on these improved `RandomAccessFile` operations. - Commit messages: - Perform I/O operations

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

2022-12-13 Thread Sergey Bylokhov
On Tue, 13 Dec 2022 07:58:36 GMT, Alan Bateman wrote: > What you have looks okay if only Windows 32-bit is skipped but it might be > simpler to just require sun.arch.data.model == "64" so that it only runs on > 64-bit systems. Right, but one of the fix for this test explicitly added support

Re: RFR: 8293806: JDK_JAVA_OPTIONS picked up twice if launcher re-executes itself

2022-12-13 Thread Dmitry Samersoff
On Thu, 8 Dec 2022 14:21:36 GMT, Alan Bateman wrote: >> If the user has set LD_LIBRARY_PATH to use a particular libjvm.so, options >> from the JDK_JAVA_OPTIONS environment variable are picked up twice. >> >> If an option cannot be accepted twice (e.g., -agentlib), the application >> fails to

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

2022-12-13 Thread Justin King
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 >>

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

2022-12-13 Thread Alan Bateman
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