Re: RFR: JDK-8300068: UBSan CFLAGS/LDFLAGS not passed when building ADLC

2023-01-17 Thread David Holmes
On Thu, 12 Jan 2023 18:30:12 GMT, Justin King wrote: > Fix misconfigured UBSan build by funneling `UBSAN_CFLAGS` and `UBSAN_LDFLAGS` > to ADLC. > But there is also no reason not to. > Some flags should not be passed on, or build will fail. :-/ You seem to have found your reason not to. ;-) --

Re: RFR: 8287873: Add test for using -XX:+AutoCreateSharedArchive with different JDK versions [v9]

2023-01-17 Thread Ioi Lam
On Fri, 13 Jan 2023 17:05:10 GMT, Matias Saavedra Silva wrote: >> This is an enhancement of the test case in >> [JDK-8296754](https://bugs.openjdk.org/browse/JDK-8296754), which tests >> against an archive created by the "boot JDK", which is usually set as the >> previous official JDK release

Re: RFR: 8297851: Add devkit for RISC-V

2023-01-17 Thread Fei Yang
On Mon, 19 Dec 2022 01:35:42 GMT, Fei Yang wrote: >> We should add devkit support for linux/riscv64. > > make/devkit/Tools.gmk line 71: > >> 69: BASE_OS_VERSION := $(DEFAULT_OS_VERSION) >> 70: endif >> 71: BASE_URL := >> http://fedora.riscv.rocks/repos-dist/$(BASE_OS_VERSION)/$(AR

Re: RFR: 8297851: Add devkit for RISC-V

2023-01-17 Thread Fei Yang
On Wed, 30 Nov 2022 14:03:30 GMT, Magnus Ihse Bursie wrote: > We should add devkit support for linux/riscv64. Marked as reviewed by fyang (Reviewer). - PR: https://git.openjdk.org/jdk/pull/11432

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v13]

2023-01-17 Thread Archie L . Cobbs
> This PR adds a new lint warning category `this-escape`. > > It also adds `@SuppressWarnings` annotations as needed to the JDK itself to > allow the JDK to continue to compile with `-Xlint:all`. > > A 'this' escape warning is generated for a constructor `A()` in a class `A` > when the compiler

Re: RFR: 8300169: Build failure with clang-15

2023-01-17 Thread Jie Fu
On Tue, 17 Jan 2023 18:12:44 GMT, Phil Race wrote: > client changes are OK by me. Thanks @prrace . - PR: https://git.openjdk.org/jdk/pull/12005

Re: RFR: 8300169: Build failure with clang-15

2023-01-17 Thread Jie Fu
v. 2023 ? 17:55, Alan Bateman a ?crit : > > -- next part -- An HTML attachment was scrubbed... > URL: > <https://mail.openjdk.org/pipermail/build-dev/attachments/20230117/4dc50b9b/attachment.htm> - PR: https://git.openjdk.org/jdk/pull/12005

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v11]

2023-01-17 Thread Archie L . Cobbs
On Tue, 17 Jan 2023 15:53:57 GMT, Brian Goetz wrote: > I agree with this conclusion. Also, even if a class is public, our question > should be: is this class in a non-exported package? Because, if so, even a > public class can be "implementation specific". Agreed - I originally thought this wa

RFR: 8146132: Excessive output from make test-image

2023-01-17 Thread Erik Joelsson
Here is my attempt at solving Coleen's logging issue. This patch changes the log level for the "build info" log messages for all native test libs and executables to `LogInfo`. It also adds a new meta log message for each call to SetupTestFilesCompilation, which is kept on LogWarn level, which pr

Integrated: JDK-8300254: ASan build does not correctly propagate ASAN_OPTIONS

2023-01-17 Thread Justin King
On Tue, 17 Jan 2023 13:50:48 GMT, Justin King wrote: > Update ASan build to use the same approach as UBSan for setting default > options. The main difference is that we only want to change the default ASan > options for processes which launch the JVM. We do this by only compiling the > default

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v12]

2023-01-17 Thread Archie L . Cobbs
> This PR adds a new lint warning category `this-escape`. > > It also adds `@SuppressWarnings` annotations as needed to the JDK itself to > allow the JDK to continue to compile with `-Xlint:all`. > > A 'this' escape warning is generated for a constructor `A()` in a class `A` > when the compiler

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v11]

2023-01-17 Thread Archie L . Cobbs
On Tue, 17 Jan 2023 15:53:57 GMT, Brian Goetz wrote: > A more complete analysis would analyze the base class + possible subclass > combinations, and could exclude some escapes which are harmless (i.e., the > base class passes `this` to an overridable method, but no overrides make use > of it,

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v11]

2023-01-17 Thread Archie L . Cobbs
On Tue, 17 Jan 2023 18:09:51 GMT, Vicente Romero wrote: >> Archie L. Cobbs has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Remove unused type variable on method visitScoped(). >> - Remove expression type filtering; it doesn't seem t

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v11]

2023-01-17 Thread Archie L . Cobbs
On Tue, 17 Jan 2023 16:15:33 GMT, Jan Lahoda wrote: >> Archie L. Cobbs has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Remove unused type variable on method visitScoped(). >> - Remove expression type filtering; it doesn't seem to be

Re: RFR: 8300169: Build failure with clang-15

2023-01-17 Thread Phil Race
On Sat, 14 Jan 2023 14:28:32 GMT, Jie Fu wrote: > Hi all, > > Please review the fix for the build failure with clang-15. > > 1. -Wbitwise-instead-of-logical > >1) src/hotspot/share/oops/generateOopMap.cpp <--- fixed the > warning >2) src/hotspot/share/runtime/notificationThre

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v11]

2023-01-17 Thread Vicente Romero
On Mon, 16 Jan 2023 23:22:00 GMT, Archie L. Cobbs wrote: >> This PR adds a new lint warning category `this-escape`. >> >> It also adds `@SuppressWarnings` annotations as needed to the JDK itself to >> allow the JDK to continue to compile with `-Xlint:all`. >> >> A 'this' escape warning is gene

Re: RFR: 8300169: Build failure with clang-15

2023-01-17 Thread Phil Race
On Tue, 17 Jan 2023 13:35:25 GMT, Kevin Rushforth wrote: >>> Normally, such changes in third-party libraries need to be done upstream, >>> and not locally. @prrace can confirm. >> >> Thanks @kevinrushforth for your review. >> >> Yes, it had been fixed in the upstream and I just follow it. >> P

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v10]

2023-01-17 Thread Archie L . Cobbs
On Mon, 16 Jan 2023 13:30:57 GMT, Jan Lahoda wrote: >> Archie L. Cobbs has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Fix bug where field initializer warnings could be incorrectly suppressed. >> - Consolidate all the unit tests that

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v10]

2023-01-17 Thread Archie L . Cobbs
On Mon, 16 Jan 2023 13:30:11 GMT, Jan Lahoda wrote: >> Archie L. Cobbs has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Fix bug where field initializer warnings could be incorrectly suppressed. >> - Consolidate all the unit tests that

Integrated: 8300120: Configure should support different defaults for CI/dev build environments

2023-01-17 Thread Magnus Ihse Bursie
On Fri, 13 Jan 2023 15:42:36 GMT, Magnus Ihse Bursie wrote: > There are several configure settings that should have different default > values depending on if configure is run as part of a CI build, or a local > developer. > > We should have a `--with-build-env=ci/dev` argument that lets you c

Integrated: JDK-8300069: Left shift of negative value in share/adlc/dict2.cpp

2023-01-17 Thread Justin King
On Thu, 12 Jan 2023 18:48:46 GMT, Justin King wrote: > Refactor `hashstr` to use unsigned integrals to avoid undefined behavior. This pull request has now been integrated. Changeset: e139ec3d Author:Justin King Committer: Magnus Ihse Bursie URL: https://git.openjdk.org/jdk/commit/e

Re: RFR: 8300169: Build failure with clang-15

2023-01-17 Thread Patrick Chen
no you have to revert the commit Le mar. 17 janv. 2023 à 17:55, Alan Bateman a écrit : > On Tue, 17 Jan 2023 13:33:06 GMT, Kevin Rushforth wrote: > > >> Hi all, > >> > >> Please review the fix for the build failure with clang-15. > >> > >> 1. -Wbitwise-instead-of-logical > >> > >>1) src/ho

Re: RFR: JDK-8300254: ASan build does not correctly propagate ASAN_OPTIONS

2023-01-17 Thread Magnus Ihse Bursie
On Tue, 17 Jan 2023 13:50:48 GMT, Justin King wrote: > Update ASan build to use the same approach as UBSan for setting default > options. The main difference is that we only want to change the default ASan > options for processes which launch the JVM. We do this by only compiling the > default

Re: RFR: 8300169: Build failure with clang-15

2023-01-17 Thread Alan Bateman
On Tue, 17 Jan 2023 13:33:06 GMT, Kevin Rushforth wrote: >> Hi all, >> >> Please review the fix for the build failure with clang-15. >> >> 1. -Wbitwise-instead-of-logical >> >>1) src/hotspot/share/oops/generateOopMap.cpp <--- fixed the >> warning >>2) src/hotspot/share/runtim

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v10]

2023-01-17 Thread Jan Lahoda
On Fri, 13 Jan 2023 22:48:59 GMT, Archie L. Cobbs wrote: >> This PR adds a new lint warning category `this-escape`. >> >> It also adds `@SuppressWarnings` annotations as needed to the JDK itself to >> allow the JDK to continue to compile with `-Xlint:all`. >> >> A 'this' escape warning is gene

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v11]

2023-01-17 Thread Jan Lahoda
On Mon, 16 Jan 2023 23:22:00 GMT, Archie L. Cobbs wrote: >> This PR adds a new lint warning category `this-escape`. >> >> It also adds `@SuppressWarnings` annotations as needed to the JDK itself to >> allow the JDK to continue to compile with `-Xlint:all`. >> >> A 'this' escape warning is gene

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v11]

2023-01-17 Thread Brian Goetz
On Mon, 16 Jan 2023 23:22:00 GMT, Archie L. Cobbs wrote: >> This PR adds a new lint warning category `this-escape`. >> >> It also adds `@SuppressWarnings` annotations as needed to the JDK itself to >> allow the JDK to continue to compile with `-Xlint:all`. >> >> A 'this' escape warning is gene

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v11]

2023-01-17 Thread Maurizio Cimadamore
On Tue, 17 Jan 2023 15:36:49 GMT, Archie L. Cobbs wrote: > nstead, we could widen the maintenance boundary to the package/module > boundary, and instead ask: Is X public, not final, not sealed, and does X > have a non-private constructor? > > This is not a perfect drawing of that boundary, bec

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v11]

2023-01-17 Thread Archie L . Cobbs
On Tue, 17 Jan 2023 11:44:22 GMT, Maurizio Cimadamore wrote: > Yes, other clients might be able to access the hashmap, and observe a > possibly uninitialized value - but this is in the same bucket as the factory > example I gave last week, where a private constructor (called by public > facto

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v11]

2023-01-17 Thread Archie L . Cobbs
On Tue, 17 Jan 2023 11:23:24 GMT, Maurizio Cimadamore wrote: >> Archie L. Cobbs has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Remove unused type variable on method visitScoped(). >> - Remove expression type filtering; it doesn't

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v11]

2023-01-17 Thread Archie L . Cobbs
On Tue, 17 Jan 2023 11:23:07 GMT, Maurizio Cimadamore wrote: >> Archie L. Cobbs has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Remove unused type variable on method visitScoped(). >> - Remove expression type filtering; it doesn't

Re: RFR: JDK-8300254: ASan build does not correctly propagate ASAN_OPTIONS

2023-01-17 Thread Justin King
On Tue, 17 Jan 2023 13:50:48 GMT, Justin King wrote: > Update ASan build to use the same approach as UBSan for setting default > options. The main difference is that we only want to change the default ASan > options for processes which launch the JVM. We do this by only compiling the > default

RFR: JDK-8300254: ASan build does not correctly propagate ASAN_OPTIONS

2023-01-17 Thread Justin King
Update ASan build to use the same approach as UBSan for setting default options. The main difference is that we only want to change the default ASan options for processes which launch the JVM. We do this by only compiling the default options in the common launcher build file. - Com

Re: RFR: 8300169: Build failure with clang-15

2023-01-17 Thread Kevin Rushforth
On Sun, 15 Jan 2023 01:56:06 GMT, Jie Fu wrote: >> src/java.desktop/share/native/libharfbuzz/hb-meta.hh line 191: >> >>> 189: #define hb_int_max(T) hb_int_max::value >>> 190: >>> 191: #if defined(__GNUC__) && __GNUC__ < 5 && !defined(__clang__) >> >> Normally, such changes in third-party libra

Re: RFR: 8300169: Build failure with clang-15

2023-01-17 Thread Kevin Rushforth
On Sat, 14 Jan 2023 14:28:32 GMT, Jie Fu wrote: > Hi all, > > Please review the fix for the build failure with clang-15. > > 1. -Wbitwise-instead-of-logical > >1) src/hotspot/share/oops/generateOopMap.cpp <--- fixed the > warning >2) src/hotspot/share/runtime/notificationThre

Re: RFR: 8300120: Configure should support different defaults for CI/dev build environments

2023-01-17 Thread Erik Joelsson
On Fri, 13 Jan 2023 15:42:36 GMT, Magnus Ihse Bursie wrote: > There are several configure settings that should have different default > values depending on if configure is run as part of a CI build, or a local > developer. > > We should have a `--with-build-env=ci/dev` argument that lets you c

Re: RFR: 8298047: Remove all non-significant trailing whitespace from properties files [v2]

2023-01-17 Thread Magnus Ihse Bursie
On Tue, 17 Jan 2023 11:44:32 GMT, Vladimir Sitnikov wrote: >> @RogerRiggs Thanks! > > @magicus , have you considered adding `.editorconfig` file (see > https://editorconfig.org/ ) so it configures developers' editors to trim the > whitespace? > > Of course, `.editorconfig` does not enforce th

Re: RFR: 8298047: Remove all non-significant trailing whitespace from properties files [v2]

2023-01-17 Thread Vladimir Sitnikov
On Mon, 16 Jan 2023 18:52:24 GMT, Magnus Ihse Bursie wrote: >> The non-client parts look fine. > > @RogerRiggs Thanks! @magicus , have you considered adding `.editorconfig` file (see https://editorconfig.org/ ) so it configures developers' editors to trim the whitespace? Of course, `.editorco

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v11]

2023-01-17 Thread Maurizio Cimadamore
On Mon, 16 Jan 2023 23:22:00 GMT, Archie L. Cobbs wrote: >> This PR adds a new lint warning category `this-escape`. >> >> It also adds `@SuppressWarnings` annotations as needed to the JDK itself to >> allow the JDK to continue to compile with `-Xlint:all`. >> >> A 'this' escape warning is gene

Re: RFR: 8300169: Build failure with clang-15

2023-01-17 Thread Jie Fu
On Sat, 14 Jan 2023 14:28:32 GMT, Jie Fu wrote: > Hi all, > > Please review the fix for the build failure with clang-15. > > 1. -Wbitwise-instead-of-logical > >1) src/hotspot/share/oops/generateOopMap.cpp <--- fixed the > warning >2) src/hotspot/share/runtime/notificationThre

Re: RFR: 8300120: Configure should support different defaults for CI/dev build environments

2023-01-17 Thread Magnus Ihse Bursie
On Tue, 17 Jan 2023 04:13:22 GMT, David Holmes wrote: >> There are several configure settings that should have different default >> values depending on if configure is run as part of a CI build, or a local >> developer. >> >> We should have a `--with-build-env=ci/dev` argument that lets you ch

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v11]

2023-01-17 Thread Maurizio Cimadamore
On Mon, 16 Jan 2023 23:22:00 GMT, Archie L. Cobbs wrote: >> This PR adds a new lint warning category `this-escape`. >> >> It also adds `@SuppressWarnings` annotations as needed to the JDK itself to >> allow the JDK to continue to compile with `-Xlint:all`. >> >> A 'this' escape warning is gene

Re: RFR: JDK-8300068: UBSan CFLAGS/LDFLAGS not passed when building ADLC

2023-01-17 Thread Magnus Ihse Bursie
On Thu, 12 Jan 2023 18:30:12 GMT, Justin King wrote: > Fix misconfigured UBSan build by funneling `UBSAN_CFLAGS` and `UBSAN_LDFLAGS` > to ADLC. But there is also no reason *not* to. Overall, the ADLC build has been a constant source of trouble. Some flags should be passed on, or build will f

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v11]

2023-01-17 Thread Maurizio Cimadamore
On Mon, 16 Jan 2023 23:22:00 GMT, Archie L. Cobbs wrote: >> This PR adds a new lint warning category `this-escape`. >> >> It also adds `@SuppressWarnings` annotations as needed to the JDK itself to >> allow the JDK to continue to compile with `-Xlint:all`. >> >> A 'this' escape warning is gene

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v7]

2023-01-17 Thread Maurizio Cimadamore
On Sat, 14 Jan 2023 01:54:23 GMT, Archie L. Cobbs wrote: >>> Ok - I thought false negative was the thing to absolutely avoid - and that >>> was the no. 1 concern. >> >> You're right. I think at the time I reasoned that it would be unusual enough >> for the type of an expression to start as an

Re: RFR: JDK-8300069: Left shift of negative value in share/adlc/dict2.cpp [v4]

2023-01-17 Thread Kim Barrett
On Fri, 13 Jan 2023 16:01:55 GMT, Justin King wrote: >> Refactor `hashstr` to use unsigned integrals to avoid undefined behavior. > > Justin King has updated the pull request with a new target base due to a > merge or a rebase. The pull request now contains four commits: > > - Resolve conflict