[jdk20] RFR: 8299789: Compilation of gtest causes build to fail if runtime libraries are in different dirs

2023-01-10 Thread Sergey Bylokhov
Hi all, This pull request contains a backport of commit [c8a8388a](https://github.com/openjdk/jdk/commit/c8a8388aba3dc121bad04aaa123f6cd7525c3d38) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. The commit being backported was authored by Sergey Bylokhov on 10 Jan 2023 and was

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

2023-01-10 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

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

2023-01-10 Thread Archie L . Cobbs
On Tue, 10 Jan 2023 23:38:14 GMT, Maurizio Cimadamore wrote: >> OK I'm glad you pointed that out because I'm a little unclear on the best >> way to do this bit. >> >> Just to confirm, you are saying that this: >> >> `if (erasure(type).equalsIgnoreMetadata(outerType)) {` >> >> should be

RFR: 8299918: Update Xcode11.3.1-MacOSX10.15 devkit at Oracle

2023-01-10 Thread Mikael Vidstedt
Update the Xcode11.3.1-MacOSX10.15 devkit version used on macOS at Oracle to work around an issue on Ventura. - Commit messages: - 8299918: Update Xcode11.3.1-MacOSX10.15 devkit at Oracle Changes: https://git.openjdk.org/jdk/pull/11932/files Webrev:

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

2023-01-10 Thread Archie L . Cobbs
On Wed, 11 Jan 2023 00:04:14 GMT, Maurizio Cimadamore wrote: >> Yes, because the 'this' reference can bounce around through different >> variables in scope each time around the loop. So we have to repeat the loop >> until all 'this' references have "flooded" into all the nooks and crannies.

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

2023-01-10 Thread Archie L . Cobbs
On Tue, 10 Jan 2023 23:45:59 GMT, Maurizio Cimadamore wrote: >> It's slightly different from that. >> >> Considering any of the various things in scope that can point to an object >> (these are: the current 'this' instance, the current outer 'this' instance, >> method parameter/variable,

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

2023-01-10 Thread Maurizio Cimadamore
On Tue, 10 Jan 2023 19:20:35 GMT, Archie L. Cobbs wrote: >> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ThisEscapeAnalyzer.java >> line 1098: >> >>> 1096: private void visitLooped(T tree, Consumer >>> visitor) { >>> 1097: this.visitScoped(tree, false, t -> { >>> 1098:

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

2023-01-10 Thread Maurizio Cimadamore
On Tue, 10 Jan 2023 19:18:04 GMT, Archie L. Cobbs wrote: >> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ThisEscapeAnalyzer.java >> line 85: >> >>> 83: * >>> 84: * >>> 85: * When tracking references, we distinguish between direct references >>> and indirect references, >> >>

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

2023-01-10 Thread Maurizio Cimadamore
On Tue, 10 Jan 2023 19:42:06 GMT, Archie L. Cobbs wrote: >> src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java line 2345: >> >>> 2343: if (!innerType.hasTag(CLASS) || !outerType.hasTag(CLASS)) >>> 2344: return false; >>> 2345: innerType =

Re: RFR: JDK-8298908: Instrument Metaspace for ASan [v11]

2023-01-10 Thread Justin King
On Tue, 10 Jan 2023 21:55:51 GMT, Ioi Lam wrote: >> Justin King has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Use macros from when available and update >> justification >> >> Signed-off-by: Justin King > >

Re: RFR: JDK-8298908: Instrument Metaspace for ASan [v12]

2023-01-10 Thread Justin King
> This change instruments Metaspace for ASan. Metaspace allocates memory using > `mmap`/`munmap` which ASan is not aware of. Fortunately ASan supports > applications [manually poisoning/unpoisoning > memory](https://github.com/google/sanitizers/wiki/AddressSanitizerManualPoisoning). > ASan is

Re: RFR: JDK-8298908: Instrument Metaspace for ASan [v11]

2023-01-10 Thread Ioi Lam
On Tue, 10 Jan 2023 17:27:33 GMT, Justin King wrote: >> This change instruments Metaspace for ASan. Metaspace allocates memory using >> `mmap`/`munmap` which ASan is not aware of. Fortunately ASan supports >> applications [manually poisoning/unpoisoning >>

RFR: 8146132: Excessive output from make test-image

2023-01-10 Thread Coleen Phillimore
This change makes native output files be only printed when building with LOG=info, to make the build not have so many pages of output. Tested with GHA and locally (tbd) - Commit messages: - 8146132: Excessive output from make test-image Changes:

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

2023-01-10 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

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

2023-01-10 Thread Archie L . Cobbs
On Mon, 9 Jan 2023 15:03:10 GMT, Maurizio Cimadamore wrote: >> Archie L. Cobbs has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix incorrect @bug numbers in unit tests. > >

Re: RFR: JDK-8298908: Instrument Metaspace for ASan [v2]

2023-01-10 Thread Justin King
On Tue, 10 Jan 2023 17:05:48 GMT, Ioi Lam wrote: >> I don't believe so, at least not based on current options. Other projects >> use similar tricks, like ABSL_DCHECK from Abseil which short circuits >> expressions when in non-debug builds causing the code to be unreachable and >> stripped. If

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

2023-01-10 Thread Maurizio Cimadamore
On Sat, 7 Jan 2023 21:08:07 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

Re: RFR: JDK-8298908: Instrument Metaspace for ASan [v11]

2023-01-10 Thread Justin King
> This change instruments Metaspace for ASan. Metaspace allocates memory using > `mmap`/`munmap` which ASan is not aware of. Fortunately ASan supports > applications [manually poisoning/unpoisoning > memory](https://github.com/google/sanitizers/wiki/AddressSanitizerManualPoisoning). > ASan is

Re: RFR: JDK-8298908: Instrument Metaspace for ASan [v2]

2023-01-10 Thread Ioi Lam
On Mon, 9 Jan 2023 15:48:48 GMT, Justin King wrote: >> I like this, but would compilers not complain about unused statements? > > I don't believe so, at least not based on current options. Other projects use > similar tricks, like ABSL_DCHECK from Abseil which short circuits expressions > when

Re: RFR: 8299811: SHIFT_JIS compatible charsets should be in java.base module on Linux platform

2023-01-10 Thread Ichiroh Takiguchi
On Mon, 9 Jan 2023 22:20:57 GMT, Naoto Sato wrote: >> On Japanese environment, following SHIFT_JIS compatible charsets are there: >> * PCK (x-PCK) >> * MS932 (windows-31j) >> * IBM943C (x-IBM943C) >> >> According to make/data/charsetmapping/charsets, >> PCK and MS932 are independent charset and

Re: RFR: JDK-8298908: Instrument Metaspace for ASan [v2]

2023-01-10 Thread Justin King
On Tue, 10 Jan 2023 06:57:01 GMT, David Holmes wrote: >> This doesn't look "too terrible", but I can't comment on the actual >> poisoning strategies. >> >> Cheers. > >> Forcing 2 reviewers to ensure @dholmes-ora can chime in before moving >> forward. > > Well I won't be able to Review as not

Integrated: 8299789: Compilation of gtest causes build to fail if runtime libraries are in different dirs

2023-01-10 Thread Sergey Bylokhov
On Mon, 9 Jan 2023 09:18:52 GMT, Sergey Bylokhov wrote: > The `GtestImage.gmk` is updated to use separate macro calls in case the > runtime libraries are not in the same directory. This pull request has now been integrated. Changeset: c8a8388a Author:Sergey Bylokhov URL:

Re: RFR: JDK-8298908: Instrument Metaspace for ASan [v2]

2023-01-10 Thread Thomas Stuefe
On Tue, 10 Jan 2023 06:57:01 GMT, David Holmes wrote: > > Forcing 2 reviewers to ensure @dholmes-ora can chime in before moving > > forward. > > Well I won't be able to Review as not familiar enough with the code, so > you'll need a second reviewer anyway. I don't hate this to the point of >