From jjg at openjdk.org Thu Feb 1 00:22:10 2024
From: jjg at openjdk.org (Jonathan Gibbons)
Date: Thu, 1 Feb 2024 00:22:10 GMT
Subject: RFR: JDK-8298405: Support Markdown in Documentation Comments [v7]
In-Reply-To: <9udnoUCtCVEEO3rIQypPb3f14bMp6wVRRO4x0yNKZpw=.b1245fbf-e2eb-44c1-9b44-76ccbefe200f@github.com>
References:
<0pRMUgBnvCfb7DTm_pDnIlmuYdXH8URKFAIk5cT082Y=.f4c324b6-ef98-41b3-9b06-9cb82e03b08f@github.com>
<9udnoUCtCVEEO3rIQypPb3f14bMp6wVRRO4x0yNKZpw=.b1245fbf-e2eb-44c1-9b44-76ccbefe200f@github.com>
Message-ID:
On Wed, 31 Jan 2024 23:09:57 GMT, Jonathan Gibbons wrote:
>> Yes, you need to escape `[` and `]` within the label of any Markdown reference link, by preceding each with backslash. (Remember, the label is the string used to find the URL for the link; not the displayed text of the link).
>> That's a CommonMark feature independent of this work.
>>
>> While we could change that `replace` call into two separate ones, in reference signatures they always appear together as a pair, and can be replaced together. We need to remove the escape characters in the generated URL so that the signature is a standard signature with unescaped `[]`
>>
>> For fun/demo, try the following:
>>
>>
>> /// First sentence.
>> /// * Link 0 to [java.lang.Object]
>> /// * Link 1a to [Arrays-equals][java.util.Arrays#equals(Object[],Object[])]
>> /// * Link 1b to [Arrays-equals][java.util.Arrays#equals(Object[],Object[])]
>> /// * Link 2a to [java.util.Arrays#equals(Object[],Object[])]
>> /// * Link 2b to [java.util.Arrays#equals(Object[],Object[])]
>> public class C { }
>>
>>
>> Link 1a and 2a end up as unprocessed "literal" text (because the `[]` were not escaped.) That is, they are not even recognized by the CommonMark parser as reference links. Link 1b and 2b get processed as links, as expected.
>>
>> FWIW, this issue with needing to escape `[]` pairs is specifically mentioned in the JEP as an inescapable (sic) limitation.
>
> I'll add a test case.
Done
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16388#discussion_r1473644884
From jjg at openjdk.org Thu Feb 1 00:38:11 2024
From: jjg at openjdk.org (Jonathan Gibbons)
Date: Thu, 1 Feb 2024 00:38:11 GMT
Subject: RFR: JDK-8298405: Support Markdown in Documentation Comments [v6]
In-Reply-To:
References:
<0mlIFIZ2ec8oE2zlmKxoMwp59dBgOdUQs-vzTLnU7hI=.15fa2827-8c87-415b-ab74-0e42b45a5cf7@github.com>
Message-ID:
On Tue, 30 Jan 2024 00:39:43 GMT, Jonathan Gibbons wrote:
>> src/jdk.compiler/share/classes/com/sun/tools/javac/parser/DocCommentParser.java line 259:
>>
>>> 257: LineKind lineKind = textKind == DocTree.Kind.MARKDOWN ? peekLineKind() : null;
>>> 258:
>>> 259: if (DEBUG) System.err.println("starting content " + showPos(bp) + " " + newline);
>>
>> Debug output is useful. I wonder if we should consider https://openjdk.org/jeps/264.
>
> My oops for leaving the code in, or at least not cleaning it up more.
yeah, the debug code was pretty obsolete; I removed all except the generally useful method to show the text surrounding a position in the input buffer.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16388#discussion_r1473654007
From jjg at openjdk.org Thu Feb 1 01:06:15 2024
From: jjg at openjdk.org (Jonathan Gibbons)
Date: Thu, 1 Feb 2024 01:06:15 GMT
Subject: RFR: JDK-8298405: Support Markdown in Documentation Comments [v7]
In-Reply-To:
References:
<0pRMUgBnvCfb7DTm_pDnIlmuYdXH8URKFAIk5cT082Y=.f4c324b6-ef98-41b3-9b06-9cb82e03b08f@github.com>
Message-ID: <_gXMWS65YgIw407hA80Xje-d4ws86vbtNqJuv2AUuH0=.9a143695-1fb0-4862-b07e-9ae720fe4029@github.com>
On Fri, 26 Jan 2024 16:33:08 GMT, Pavel Rappo wrote:
>> Jonathan Gibbons has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains eight commits:
>>
>> - Merge with upstream/master
>> - Merge with upstream/master
>> - Merge remote-tracking branch 'upstream/master' into 8298405.doclet-markdown-v3
>> - Address review comments
>> - Fix whitespace
>> - Improve handling of embedded inline taglets
>> - Customize support for Markdown headings
>> - JDK-8298405: Support Markdown in Documentation Comments
>
> src/jdk.internal.md/share/classes/jdk/internal/markdown/MarkdownTransformer.java line 668:
>
>> 666: * U+FFFC characters that were found in the original document.
>> 667: */
>> 668: Iterator> replaceIter;
>
> Suggestion:
>
> final Iterator> replaceIter;
actually, `private final` ... done
> src/jdk.internal.md/share/classes/jdk/internal/markdown/MarkdownTransformer.java line 732:
>
>> 730: offsets.add(m.end());
>> 731: }
>> 732: sourceLineOffsets = offsets.stream().mapToInt(Integer::intValue).toArray();
>
> Here's an alternative, which you might find better (or not):
> Suggestion:
>
> sourceLineOffsets = Stream.concat(Stream.of(0), lineBreak.matcher(source).results()
> .map(MatchResult::end)).mapToInt(Integer::intValue).toArray();
done
it's borderline (to me) that it's worthwhile but given that my original code used streams to create the final array, it sort-of makes sense to go "all in".
> src/jdk.internal.md/share/classes/jdk/internal/markdown/MarkdownTransformer.java line 831:
>
>> 829: /**
>> 830: * {@return the position in the original comment for a position in {@code source},
>> 831: * using {@link #replaceAdjustPos}}.
>
> Suggestion:
>
> * using {@link #replaceAdjustPos}}
done
> src/jdk.internal.md/share/classes/jdk/internal/markdown/MarkdownTransformer.java line 939:
>
>> 937:
>> 938: /**
>> 939: * Flush any text in the {@code text} buffer, by creating a new
>
> Suggestion:
>
> * Flushes any text in the {@code text} buffer, by creating a new
done
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16388#discussion_r1473668136
PR Review Comment: https://git.openjdk.org/jdk/pull/16388#discussion_r1473670108
PR Review Comment: https://git.openjdk.org/jdk/pull/16388#discussion_r1473668952
PR Review Comment: https://git.openjdk.org/jdk/pull/16388#discussion_r1473668548
From jjg at openjdk.org Thu Feb 1 01:12:52 2024
From: jjg at openjdk.org (Jonathan Gibbons)
Date: Thu, 1 Feb 2024 01:12:52 GMT
Subject: RFR: JDK-8298405: Support Markdown in Documentation Comments [v15]
In-Reply-To:
References:
Message-ID:
> Please review a patch to add support for Markdown syntax in documentation comments, as described in the associated JEP.
>
> Notable features:
>
> * support for `///` documentation comments in `JavaTokenizer`
> * new module `jdk.internal.md` -- a private copy of the `commonmark-java` library
> * updates to `DocCommentParser` to treat `///` comments as Markdown
> * updates to the standard doclet to render Markdown comments in HTML
Jonathan Gibbons has updated the pull request incrementally with four additional commits since the last revision:
- MarkdownTransformer: tweak doc comments
- MarkdownTransformer: change `Lower.replaceIter` to be `private final`
- MarkdownTransformer: use suggested text for using streams
- remove obsolete debug code
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/16388/files
- new: https://git.openjdk.org/jdk/pull/16388/files/586daddf..54d40b20
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=16388&range=14
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=16388&range=13-14
Stats: 26 lines in 2 files changed: 2 ins; 13 del; 11 mod
Patch: https://git.openjdk.org/jdk/pull/16388.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/16388/head:pull/16388
PR: https://git.openjdk.org/jdk/pull/16388
From clanger at openjdk.org Thu Feb 1 07:54:01 2024
From: clanger at openjdk.org (Christoph Langer)
Date: Thu, 1 Feb 2024 07:54:01 GMT
Subject: RFR: 8324937: GHA: Avoid multiple test suites per job
In-Reply-To:
References:
Message-ID:
On Tue, 30 Jan 2024 10:34:40 GMT, Aleksey Shipilev wrote:
> See the description in the bug. This mitigates the issue by splitting out the only test job that has two test suites in it.
Marked as reviewed by clanger (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/17627#pullrequestreview-1855755356
From shade at openjdk.org Thu Feb 1 08:14:09 2024
From: shade at openjdk.org (Aleksey Shipilev)
Date: Thu, 1 Feb 2024 08:14:09 GMT
Subject: Integrated: 8324937: GHA: Avoid multiple test suites per job
In-Reply-To:
References:
Message-ID:
On Tue, 30 Jan 2024 10:34:40 GMT, Aleksey Shipilev wrote:
> See the description in the bug. This mitigates the issue by splitting out the only test job that has two test suites in it.
This pull request has now been integrated.
Changeset: 1aba78f2
Author: Aleksey Shipilev
URL: https://git.openjdk.org/jdk/commit/1aba78f2720b581f18fc2cec5e84deba6b2bcd41
Stats: 6 lines in 1 file changed: 5 ins; 0 del; 1 mod
8324937: GHA: Avoid multiple test suites per job
Reviewed-by: erikj, clanger
-------------
PR: https://git.openjdk.org/jdk/pull/17627
From ihse at openjdk.org Thu Feb 1 09:08:38 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Thu, 1 Feb 2024 09:08:38 GMT
Subject: RFR: 8324834: Use _LARGE_FILES on AIX [v3]
In-Reply-To:
References:
Message-ID:
> In the same spirit as [JDK-8318696](https://bugs.openjdk.org/browse/JDK-8318696), we should adapt the AIX-specific code in hotspot so it uses the well-defined posix `` functions, instead of `64`. By setting the define _LARGE_FILES, this will make `` behave as `64`, just as _FILE_OFFSET_BITS=64 does on gcc. (Reference: https://www.ibm.com/docs/en/aix/7.1?topic=volumes-writing-programs-that-access-large-files)
>
> In theory, it should not even be necessary to set this, since we only compile for 64-bit AIX platforms, and this is only relevant on 32-bit platforms. But let's add the define anyway, for good measure. It shows at least that we have thought about the matter. :-)
>
> I have not been able to test this on AIX. I hope someone with AIX access can take this for a spin.
>
> The reason I'm doing this is for [JDK-8324539](https://bugs.openjdk.org/browse/JDK-8324539). After both these bugs are fixed, there will be no more `64` function calls in the code base.
Magnus Ihse Bursie has updated the pull request incrementally with one additional commit since the last revision:
Add compile time check for _LARGE_FILES
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/17611/files
- new: https://git.openjdk.org/jdk/pull/17611/files/5119bdc9..3cb64b99
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=17611&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=17611&range=01-02
Stats: 4 lines in 1 file changed: 4 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/17611.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17611/head:pull/17611
PR: https://git.openjdk.org/jdk/pull/17611
From mbaesken at openjdk.org Thu Feb 1 09:08:38 2024
From: mbaesken at openjdk.org (Matthias Baesken)
Date: Thu, 1 Feb 2024 09:08:38 GMT
Subject: RFR: 8324834: Use _LARGE_FILES on AIX [v2]
In-Reply-To:
References:
Message-ID:
On Tue, 30 Jan 2024 12:25:47 GMT, Magnus Ihse Bursie wrote:
>> In the same spirit as [JDK-8318696](https://bugs.openjdk.org/browse/JDK-8318696), we should adapt the AIX-specific code in hotspot so it uses the well-defined posix `` functions, instead of `64`. By setting the define _LARGE_FILES, this will make `` behave as `64`, just as _FILE_OFFSET_BITS=64 does on gcc. (Reference: https://www.ibm.com/docs/en/aix/7.1?topic=volumes-writing-programs-that-access-large-files)
>>
>> In theory, it should not even be necessary to set this, since we only compile for 64-bit AIX platforms, and this is only relevant on 32-bit platforms. But let's add the define anyway, for good measure. It shows at least that we have thought about the matter. :-)
>>
>> I have not been able to test this on AIX. I hope someone with AIX access can take this for a spin.
>>
>> The reason I'm doing this is for [JDK-8324539](https://bugs.openjdk.org/browse/JDK-8324539). After both these bugs are fixed, there will be no more `64` function calls in the code base.
>
> Magnus Ihse Bursie has updated the pull request incrementally with one additional commit since the last revision:
>
> Revert "8324753: [AIX] adjust os_posix after JDK-8318696"
>
> This reverts commit 8950d68ddb36d35831fbb4b98969cd0537527070.
Marked as reviewed by mbaesken (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/17611#pullrequestreview-1855922518
From ihse at openjdk.org Thu Feb 1 09:08:38 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Thu, 1 Feb 2024 09:08:38 GMT
Subject: RFR: 8324834: Use _LARGE_FILES on AIX [v2]
In-Reply-To:
References:
Message-ID:
On Tue, 30 Jan 2024 12:25:47 GMT, Magnus Ihse Bursie wrote:
>> In the same spirit as [JDK-8318696](https://bugs.openjdk.org/browse/JDK-8318696), we should adapt the AIX-specific code in hotspot so it uses the well-defined posix `` functions, instead of `64`. By setting the define _LARGE_FILES, this will make `` behave as `64`, just as _FILE_OFFSET_BITS=64 does on gcc. (Reference: https://www.ibm.com/docs/en/aix/7.1?topic=volumes-writing-programs-that-access-large-files)
>>
>> In theory, it should not even be necessary to set this, since we only compile for 64-bit AIX platforms, and this is only relevant on 32-bit platforms. But let's add the define anyway, for good measure. It shows at least that we have thought about the matter. :-)
>>
>> I have not been able to test this on AIX. I hope someone with AIX access can take this for a spin.
>>
>> The reason I'm doing this is for [JDK-8324539](https://bugs.openjdk.org/browse/JDK-8324539). After both these bugs are fixed, there will be no more `64` function calls in the code base.
>
> Magnus Ihse Bursie has updated the pull request incrementally with one additional commit since the last revision:
>
> Revert "8324753: [AIX] adjust os_posix after JDK-8318696"
>
> This reverts commit 8950d68ddb36d35831fbb4b98969cd0537527070.
I added a compile-time check that hotspot on AIX is indeed compiled with _LARGE_FILES.
@MBaesken Are you happy with this PR now?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17611#issuecomment-1920832341
From ihse at openjdk.org Thu Feb 1 09:13:07 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Thu, 1 Feb 2024 09:13:07 GMT
Subject: RFR: 8324539: Do not use LFS64 symbols in JDK libs [v4]
In-Reply-To:
References:
Message-ID:
On Wed, 31 Jan 2024 09:19:39 GMT, Matthias Baesken wrote:
>> Magnus Ihse Bursie 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 seven additional commits since the last revision:
>>
>> - Merge branch 'master' into jdk-FOB64
>> - Move #include out of debug_util.h
>> - Restore AIX dirent64 et al defines
>> - Rollback AIX changes since they are now tracked in JDK-8324834
>> - Remove superfluous setting of FOB64
>> - Replace all foo64() with foo() for large-file functions in the JDK
>> - 8324539: Do not use LFS64 symbols in JDK libs
>
> After adding this additional patch I fully build fastdebug on AIX (hav to admit it does not look very nice).
>
>
> diff --git a/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c b/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c
> index 823475b0a23..ee0109b6806 100644
> --- a/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c
> +++ b/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c
> @@ -31,6 +31,10 @@
> #include "SpanIterator.h"
> #include "Trace.h"
>
> +#if defined(_AIX) && defined(open)
> +#undef open
> +#endif
> +
> /* The "header" consists of a jint opcode and a jint span count value */
> #define INTS_PER_HEADER 2
> #define BYTES_PER_HEADER 8
@MBaesken So my fix in [25c691d](https://github.com/openjdk/jdk/pull/17538/commits/25c691df823eb9d9db1451637f28d59dd9508386) did not help? Maybe then it is some other system library that drags in `fcntl.h`; I assumed it was stdlib or stdio. That header file includes way too much that it does not need, so we can surely strip it of even more standard includes if that is what is required to fix this.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17538#issuecomment-1920844523
From alanb at openjdk.org Thu Feb 1 12:16:06 2024
From: alanb at openjdk.org (Alan Bateman)
Date: Thu, 1 Feb 2024 12:16:06 GMT
Subject: RFR: 8324539: Do not use LFS64 symbols in JDK libs [v4]
In-Reply-To:
References:
Message-ID:
On Tue, 30 Jan 2024 14:15:57 GMT, Magnus Ihse Bursie wrote:
>> Similar to [JDK-8318696](https://bugs.openjdk.org/browse/JDK-8318696), we should use -D_FILE_OFFSET_BITS=64, and not -D_LARGEFILE64_SOURCE in the JDK native libraries.
>
> Magnus Ihse Bursie 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 seven additional commits since the last revision:
>
> - Merge branch 'master' into jdk-FOB64
> - Move #include out of debug_util.h
> - Restore AIX dirent64 et al defines
> - Rollback AIX changes since they are now tracked in JDK-8324834
> - Remove superfluous setting of FOB64
> - Replace all foo64() with foo() for large-file functions in the JDK
> - 8324539: Do not use LFS64 symbols in JDK libs
I skimmed through the changes and they look okay. Can you confirm that you've run tier1-4 at least? Some of the library code that is changed here is not tested in the lower tiers.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17538#issuecomment-1921189429
From mbaesken at openjdk.org Thu Feb 1 12:25:08 2024
From: mbaesken at openjdk.org (Matthias Baesken)
Date: Thu, 1 Feb 2024 12:25:08 GMT
Subject: RFR: 8324834: Use _LARGE_FILES on AIX [v2]
In-Reply-To:
References:
Message-ID:
On Thu, 1 Feb 2024 09:04:47 GMT, Magnus Ihse Bursie wrote:
> I added a compile-time check that hotspot on AIX is indeed compiled with _LARGE_FILES.
>
> @MBaesken Are you happy with this PR now?
Thanks for adding this, I approved the PR .
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17611#issuecomment-1921204582
From tanksherman27 at gmail.com Thu Feb 1 12:47:44 2024
From: tanksherman27 at gmail.com (Julian Waters)
Date: Thu, 1 Feb 2024 20:47:44 +0800
Subject: Which JDK in the build directory is the one that is shipped?
Message-ID:
Hi all,
Quick question: Which JDK in the build directory is the one that is
officially shipped by Oracle? Is it the one in "jdk" that is directly
in the build directory, or the one in "images/jdk"?
best regards,
Julian
From ihse at openjdk.org Thu Feb 1 13:12:06 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Thu, 1 Feb 2024 13:12:06 GMT
Subject: Integrated: 8324834: Use _LARGE_FILES on AIX
In-Reply-To:
References:
Message-ID:
On Mon, 29 Jan 2024 11:44:34 GMT, Magnus Ihse Bursie wrote:
> In the same spirit as [JDK-8318696](https://bugs.openjdk.org/browse/JDK-8318696), we should adapt the AIX-specific code in hotspot so it uses the well-defined posix `` functions, instead of `64`. By setting the define _LARGE_FILES, this will make `` behave as `64`, just as _FILE_OFFSET_BITS=64 does on gcc. (Reference: https://www.ibm.com/docs/en/aix/7.1?topic=volumes-writing-programs-that-access-large-files)
>
> In theory, it should not even be necessary to set this, since we only compile for 64-bit AIX platforms, and this is only relevant on 32-bit platforms. But let's add the define anyway, for good measure. It shows at least that we have thought about the matter. :-)
>
> I have not been able to test this on AIX. I hope someone with AIX access can take this for a spin.
>
> The reason I'm doing this is for [JDK-8324539](https://bugs.openjdk.org/browse/JDK-8324539). After both these bugs are fixed, there will be no more `64` function calls in the code base.
This pull request has now been integrated.
Changeset: 8e451823
Author: Magnus Ihse Bursie
URL: https://git.openjdk.org/jdk/commit/8e45182357f4990c86fd0b711a7a91887945480b
Stats: 21 lines in 4 files changed: 4 ins; 0 del; 17 mod
8324834: Use _LARGE_FILES on AIX
Reviewed-by: erikj, mbaesken
-------------
PR: https://git.openjdk.org/jdk/pull/17611
From matthias.baesken at sap.com Thu Feb 1 13:40:28 2024
From: matthias.baesken at sap.com (Baesken, Matthias)
Date: Thu, 1 Feb 2024 13:40:28 +0000
Subject: Result: New Build Group Member: Christoph Langer
Message-ID:
The vote for Christoph Langer [1] is now closed.
Yes: 5
Veto: 0
Abstain: 0
According to the Bylaws definition of Lazy Consensus voting, this is sufficient to approve the nomination.
[1] https://mail.openjdk.org/pipermail/build-dev/2024-January/042845.html
Best regards, Matthias
>I hereby nominate Christoph Langer (clanger) to Membership in the Build Group.
>
>Christoph is a long standing member of the JVM team at SAP and a long time OpenJDK contributor [3].
>He is a member of the OpenJDK Members Group and the Vulnerability Group, and Reviewer in a number of projects.
>Christoph has contributed over 100 openjdk/jdk changes [4], among those also a number of build related changes.
>What is especially important is the fact that Christoph has build/production related expertise on a lot of different OS platforms
>(macOS, Windows, Linux, AIX).
>
>Votes are due by 1st February 2024, 13:00 CET.
>
>Only current Members of the Build Group [1] are eligible
>to vote on this nomination. Votes must be cast in the open by
>replying to this mailing list
>
>For Lazy Consensus voting instructions, see [2].
>
>Matthias Baesken
>
> [1] https://openjdk.org/census#build
> [2] https://openjdk.org/groups/#member-vote
> [3] https://openjdk.org/census#clanger
> [4] https://github.com/search?q=repo%3Aopenjdk%2Fjdk+author-name%3A%22Christoph+Langer%22&type=commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From mbaesken at openjdk.org Thu Feb 1 13:50:15 2024
From: mbaesken at openjdk.org (Matthias Baesken)
Date: Thu, 1 Feb 2024 13:50:15 GMT
Subject: RFR: 8324539: Do not use LFS64 symbols in JDK libs [v4]
In-Reply-To:
References:
Message-ID:
On Wed, 31 Jan 2024 09:19:39 GMT, Matthias Baesken wrote:
>> Magnus Ihse Bursie 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 seven additional commits since the last revision:
>>
>> - Merge branch 'master' into jdk-FOB64
>> - Move #include out of debug_util.h
>> - Restore AIX dirent64 et al defines
>> - Rollback AIX changes since they are now tracked in JDK-8324834
>> - Remove superfluous setting of FOB64
>> - Replace all foo64() with foo() for large-file functions in the JDK
>> - 8324539: Do not use LFS64 symbols in JDK libs
>
> After adding this additional patch I fully build fastdebug on AIX (hav to admit it does not look very nice).
>
>
> diff --git a/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c b/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c
> index 823475b0a23..ee0109b6806 100644
> --- a/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c
> +++ b/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c
> @@ -31,6 +31,10 @@
> #include "SpanIterator.h"
> #include "Trace.h"
>
> +#if defined(_AIX) && defined(open)
> +#undef open
> +#endif
> +
> /* The "header" consists of a jint opcode and a jint span count value */
> #define INTS_PER_HEADER 2
> #define BYTES_PER_HEADER 8
> @MBaesken So my fix in [25c691d](https://github.com/openjdk/jdk/pull/17538/commits/25c691df823eb9d9db1451637f28d59dd9508386) did not help? Maybe then it is some other system library that drags in `fcntl.h`; I assumed it was stdlib or stdio. That header file includes way too much that it does not need, so we can surely strip it of even more standard includes if that is what is required to fix this.
Unfortunately it did not help.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17538#issuecomment-1921367368
From erik.joelsson at oracle.com Thu Feb 1 13:52:00 2024
From: erik.joelsson at oracle.com (erik.joelsson at oracle.com)
Date: Thu, 1 Feb 2024 05:52:00 -0800
Subject: Which JDK in the build directory is the one that is shipped?
In-Reply-To:
References:
Message-ID:
On 2/1/24 04:47, Julian Waters wrote:
> Hi all,
>
> Quick question: Which JDK in the build directory is the one that is
> officially shipped by Oracle? Is it the one in "jdk" that is directly
> in the build directory, or the one in "images/jdk"?
The one in images/jdk is the one we base the distribution on, but it's
not actually exactly that. For historic reasons the image generated in
images/jdk contains external debug symbols, which we do not ship. To get
exactly what is shipped, run `make product-bundles` and check the
zip/tar.gz in "bundles/".
The one directly in jdk, the "exploded image", just exists because it's
faster to build, especially incrementally, so in some developer
workflows it's preferred. Since the class files are all laid out on disk
and not jlinked together, it has quite different performance
characteristics.
/Erik
From ihse at openjdk.org Thu Feb 1 13:53:56 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Thu, 1 Feb 2024 13:53:56 GMT
Subject: RFR: 8321373: Build should use LC_ALL=C.UTF-8 [v2]
In-Reply-To: <9CbEPFCW69TrCZHAEYtPrOLDJdDyPN3NN6jjKzPhEv4=.e70c5204-28a4-4f42-814f-927dad42b8d4@github.com>
References: <9CbEPFCW69TrCZHAEYtPrOLDJdDyPN3NN6jjKzPhEv4=.e70c5204-28a4-4f42-814f-927dad42b8d4@github.com>
Message-ID:
> We're currently setting LC_ALL=C. Not all tools will default to utf-8 as their encoding of choice when they see this locale, but use an arbitrarily encoding, which might not properly handle all UTF-8 characters. Since in practice, all our encoding is utf8, we should tell our tools this as well.
>
> This will at least have effect on how Java treats path names including unicode characters.
Magnus Ihse Bursie 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 three additional commits since the last revision:
- Explicitly load StandardCharsets ascii/utf-8 in HelloClasslist
- Merge branch 'master' into c.utf-8
- 8321373: Build should use LC_ALL=C.UTF-8
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/16971/files
- new: https://git.openjdk.org/jdk/pull/16971/files/5197845b..d5f5a257
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=16971&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=16971&range=00-01
Stats: 108961 lines in 2375 files changed: 61009 ins; 38143 del; 9809 mod
Patch: https://git.openjdk.org/jdk/pull/16971.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/16971/head:pull/16971
PR: https://git.openjdk.org/jdk/pull/16971
From ihse at openjdk.org Thu Feb 1 13:53:56 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Thu, 1 Feb 2024 13:53:56 GMT
Subject: RFR: 8321373: Build should use LC_ALL=C.UTF-8
In-Reply-To: <9CbEPFCW69TrCZHAEYtPrOLDJdDyPN3NN6jjKzPhEv4=.e70c5204-28a4-4f42-814f-927dad42b8d4@github.com>
References: <9CbEPFCW69TrCZHAEYtPrOLDJdDyPN3NN6jjKzPhEv4=.e70c5204-28a4-4f42-814f-927dad42b8d4@github.com>
Message-ID:
On Tue, 5 Dec 2023 10:35:05 GMT, Magnus Ihse Bursie wrote:
> We're currently setting LC_ALL=C. Not all tools will default to utf-8 as their encoding of choice when they see this locale, but use an arbitrarily encoding, which might not properly handle all UTF-8 characters. Since in practice, all our encoding is utf8, we should tell our tools this as well.
>
> This will at least have effect on how Java treats path names including unicode characters.
Of course this was not as easy. One does not simply add "utf8".
I got a diff in ./lib/classlist:
401d400
< java/nio/charset/StandardCharsets
1182d1180
< sun/nio/cs/ISO_8859_1
1184,1185d1181
< sun/nio/cs/StandardCharsets$Aliases
< sun/nio/cs/StandardCharsets$Cache
1187,1196d1182
< sun/nio/cs/Surrogate
< sun/nio/cs/Surrogate$Parser
< sun/nio/cs/US_ASCII
< sun/nio/cs/US_ASCII$Encoder
< sun/nio/cs/UTF_16
< sun/nio/cs/UTF_16BE
< sun/nio/cs/UTF_16LE
< sun/nio/cs/UTF_32
< sun/nio/cs/UTF_32BE
< sun/nio/cs/UTF_32LE
1197a1184
> sun/nio/cs/UTF_8$Encoder
1232d1218
< sun/util/PreHashedMap
The PreHashedMap thing looks weird; the other seem definitely character set related. I'll have to investigate this.
Oh, shut up Wesley!
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16971#issuecomment-1842838066
PR Comment: https://git.openjdk.org/jdk/pull/16971#issuecomment-1920847508
From ihse at openjdk.org Thu Feb 1 14:18:05 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Thu, 1 Feb 2024 14:18:05 GMT
Subject: RFR: 8321373: Build should use LC_ALL=C.UTF-8 [v2]
In-Reply-To:
References: <9CbEPFCW69TrCZHAEYtPrOLDJdDyPN3NN6jjKzPhEv4=.e70c5204-28a4-4f42-814f-927dad42b8d4@github.com>
Message-ID: <0rZyQ3dySX3aUKiRko2AuMNjoCdJ2v-hRU4ulBxkcdQ=.b7c34b91-4750-4d25-94e4-d2cf713687ce@github.com>
On Thu, 1 Feb 2024 13:53:56 GMT, Magnus Ihse Bursie wrote:
>> We're currently setting LC_ALL=C. Not all tools will default to utf-8 as their encoding of choice when they see this locale, but use an arbitrarily encoding, which might not properly handle all UTF-8 characters. Since in practice, all our encoding is utf8, we should tell our tools this as well.
>>
>> This will at least have effect on how Java treats path names including unicode characters.
>
> Magnus Ihse Bursie 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 three additional commits since the last revision:
>
> - Explicitly load StandardCharsets ascii/utf-8 in HelloClasslist
> - Merge branch 'master' into c.utf-8
> - 8321373: Build should use LC_ALL=C.UTF-8
With the changes in `HelloClasslist.java`, the following classes are added in `classlist` compared to mainline, and none are removed:
java/nio/StringCharBuffer
java/nio/charset/StandardCharsets
sun/nio/cs/ISO_8859_1
sun/nio/cs/ThreadLocalCoders
sun/nio/cs/ThreadLocalCoders$1
sun/nio/cs/ThreadLocalCoders$2
sun/nio/cs/ThreadLocalCoders$Cache
sun/nio/cs/UTF_16
sun/nio/cs/UTF_16BE
sun/nio/cs/UTF_16LE
sun/nio/cs/UTF_32
sun/nio/cs/UTF_32BE
sun/nio/cs/UTF_32LE
sun/nio/cs/UTF_8$Encoder
This seem highly reasonable to me. @cl4es Can you confirm that this is okay?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16971#issuecomment-1921436996
From ihse at openjdk.org Thu Feb 1 14:21:37 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Thu, 1 Feb 2024 14:21:37 GMT
Subject: RFR: 8324539: Do not use LFS64 symbols in JDK libs [v5]
In-Reply-To:
References:
Message-ID:
> Similar to [JDK-8318696](https://bugs.openjdk.org/browse/JDK-8318696), we should use -D_FILE_OFFSET_BITS=64, and not -D_LARGEFILE64_SOURCE in the JDK native libraries.
Magnus Ihse Bursie has updated the pull request incrementally with one additional commit since the last revision:
Remove all system includes from debug_util.h
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/17538/files
- new: https://git.openjdk.org/jdk/pull/17538/files/d6c64bc4..6e9ec631
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=17538&range=04
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=17538&range=03-04
Stats: 10 lines in 4 files changed: 6 ins; 4 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/17538.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17538/head:pull/17538
PR: https://git.openjdk.org/jdk/pull/17538
From ihse at openjdk.org Thu Feb 1 14:27:15 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Thu, 1 Feb 2024 14:27:15 GMT
Subject: RFR: 8324539: Do not use LFS64 symbols in JDK libs [v6]
In-Reply-To:
References:
Message-ID: <_ZwLqLPG2IQY-9lP4XO3KlStPatpZGye-Blofj9qfQQ=.dbffd3e3-1f37-4403-92de-63740436cde2@github.com>
> Similar to [JDK-8318696](https://bugs.openjdk.org/browse/JDK-8318696), we should use -D_FILE_OFFSET_BITS=64, and not -D_LARGEFILE64_SOURCE in the JDK native libraries.
Magnus Ihse Bursie has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains ten commits:
- Merge branch 'master' into jdk-FOB64
- Remove all system includes from debug_util.h
- Merge branch 'master' into jdk-FOB64
- Move #include out of debug_util.h
- Restore AIX dirent64 et al defines
- Rollback AIX changes since they are now tracked in JDK-8324834
- Remove superfluous setting of FOB64
- Replace all foo64() with foo() for large-file functions in the JDK
- 8324539: Do not use LFS64 symbols in JDK libs
-------------
Changes: https://git.openjdk.org/jdk/pull/17538/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17538&range=05
Stats: 233 lines in 23 files changed: 14 ins; 105 del; 114 mod
Patch: https://git.openjdk.org/jdk/pull/17538.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17538/head:pull/17538
PR: https://git.openjdk.org/jdk/pull/17538
From ihse at openjdk.org Thu Feb 1 14:27:15 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Thu, 1 Feb 2024 14:27:15 GMT
Subject: RFR: 8324539: Do not use LFS64 symbols in JDK libs [v4]
In-Reply-To:
References:
Message-ID: <3c6OBIr0CfTFj2PGPn3n3rzLkNxiNavNj-sOx5dWqTw=.64b85b44-36f1-44de-b187-93c6c94ebc9d@github.com>
On Thu, 1 Feb 2024 13:47:45 GMT, Matthias Baesken wrote:
>> After adding this additional patch I fully build fastdebug on AIX (hav to admit it does not look very nice).
>>
>>
>> diff --git a/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c b/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c
>> index 823475b0a23..ee0109b6806 100644
>> --- a/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c
>> +++ b/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c
>> @@ -31,6 +31,10 @@
>> #include "SpanIterator.h"
>> #include "Trace.h"
>>
>> +#if defined(_AIX) && defined(open)
>> +#undef open
>> +#endif
>> +
>> /* The "header" consists of a jint opcode and a jint span count value */
>> #define INTS_PER_HEADER 2
>> #define BYTES_PER_HEADER 8
>
>> @MBaesken So my fix in [25c691d](https://github.com/openjdk/jdk/pull/17538/commits/25c691df823eb9d9db1451637f28d59dd9508386) did not help? Maybe then it is some other system library that drags in `fcntl.h`; I assumed it was stdlib or stdio. That header file includes way too much that it does not need, so we can surely strip it of even more standard includes if that is what is required to fix this.
>
>
> Unfortunately it did not help.
@MBaesken How annoying. :( I have now tried to remove *all* system includes from `debug_util.h`. Can you please try again building debug on AIX, to see if it works without the `#undef` in `BufferedRenderPipe.c`?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17538#issuecomment-1921455438
From ihse at openjdk.org Thu Feb 1 14:31:04 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Thu, 1 Feb 2024 14:31:04 GMT
Subject: RFR: 8321373: Build should use LC_ALL=C.UTF-8 [v2]
In-Reply-To:
References: <9CbEPFCW69TrCZHAEYtPrOLDJdDyPN3NN6jjKzPhEv4=.e70c5204-28a4-4f42-814f-927dad42b8d4@github.com>
Message-ID:
On Thu, 1 Feb 2024 13:53:56 GMT, Magnus Ihse Bursie wrote:
>> We're currently setting LC_ALL=C. Not all tools will default to utf-8 as their encoding of choice when they see this locale, but use an arbitrarily encoding, which might not properly handle all UTF-8 characters. Since in practice, all our encoding is utf8, we should tell our tools this as well.
>>
>> This will at least have effect on how Java treats path names including unicode characters.
>
> Magnus Ihse Bursie 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 three additional commits since the last revision:
>
> - Explicitly load StandardCharsets ascii/utf-8 in HelloClasslist
> - Merge branch 'master' into c.utf-8
> - 8321373: Build should use LC_ALL=C.UTF-8
Actually, that diff was apparently platform specific. I'm not quite sure if that is caused by a different set of classes already being included in the different platforms. The above list was from macOS. On Linux, the diff look like this:
> java/nio/StringCharBuffer
1183,1184d1183
< sun/nio/cs/StandardCharsets$Aliases
< sun/nio/cs/StandardCharsets$Cache
1187a1187,1190
> sun/nio/cs/ThreadLocalCoders
> sun/nio/cs/ThreadLocalCoders$1
> sun/nio/cs/ThreadLocalCoders$2
> sun/nio/cs/ThreadLocalCoders$Cache
1196a1200
> sun/nio/cs/UTF_8$Encoder
1231d1234
< sun/util/PreHashedMap
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16971#issuecomment-1921462770
From ihse at openjdk.org Thu Feb 1 14:54:03 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Thu, 1 Feb 2024 14:54:03 GMT
Subject: RFR: 8321373: Build should use LC_ALL=C.UTF-8 [v2]
In-Reply-To:
References: <9CbEPFCW69TrCZHAEYtPrOLDJdDyPN3NN6jjKzPhEv4=.e70c5204-28a4-4f42-814f-927dad42b8d4@github.com>
Message-ID:
On Thu, 1 Feb 2024 13:53:56 GMT, Magnus Ihse Bursie wrote:
>> We're currently setting LC_ALL=C. Not all tools will default to utf-8 as their encoding of choice when they see this locale, but use an arbitrarily encoding, which might not properly handle all UTF-8 characters. Since in practice, all our encoding is utf8, we should tell our tools this as well.
>>
>> This will at least have effect on how Java treats path names including unicode characters.
>
> Magnus Ihse Bursie 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 three additional commits since the last revision:
>
> - Explicitly load StandardCharsets ascii/utf-8 in HelloClasslist
> - Merge branch 'master' into c.utf-8
> - 8321373: Build should use LC_ALL=C.UTF-8
So on Linux, with this patch, we will no longer include sun/nio/cs/StandardCharsets$Aliases, sun/nio/cs/StandardCharsets$Cache or sun/util/PreHashedMap. Even prior to this PR, they were not included on macOS.
My understanding is that these are only used when selecting a character encoding other than US ASCII, UTF-8, or Latin-1. See this snippet from the generated StandardCharsets.java:
private Charset lookup(String charsetName) {
// By checking these built-ins we can avoid initializing Aliases,
// Classes and Cache eagerly during bootstrap.
//
// Initialization of java.nio.charset.StandardCharsets should be
// avoided here to minimize time spent in System.initPhase1, as it
// may delay initialization of performance critical VM subsystems.
String csn;
if (charsetName.equals("UTF-8")) {
return UTF_8.INSTANCE;
} else if (charsetName.equals("US-ASCII")) {
return US_ASCII.INSTANCE;
} else if (charsetName.equals("ISO-8859-1")) {
return ISO_8859_1.INSTANCE;
} else {
csn = canonicalize(toLower(charsetName));
}
So my guess is that this is not necessarily a bad thing; they will need to be loaded if we want to look up more esoteric encodings, but that is perhaps not a common use case in these days of UTF-8's global triumph.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16971#issuecomment-1921511589
From mbaesken at openjdk.org Thu Feb 1 15:57:06 2024
From: mbaesken at openjdk.org (Matthias Baesken)
Date: Thu, 1 Feb 2024 15:57:06 GMT
Subject: RFR: 8324539: Do not use LFS64 symbols in JDK libs [v4]
In-Reply-To:
References:
Message-ID: <7M86DsSoWaLOQmf_cK6mXD4hTI8NZ356Z7ZRugqETzM=.bb90569d-0386-4498-9f21-d4c7e66f864f@github.com>
On Thu, 1 Feb 2024 13:47:45 GMT, Matthias Baesken wrote:
>> After adding this additional patch I fully build fastdebug on AIX (hav to admit it does not look very nice).
>>
>>
>> diff --git a/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c b/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c
>> index 823475b0a23..ee0109b6806 100644
>> --- a/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c
>> +++ b/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c
>> @@ -31,6 +31,10 @@
>> #include "SpanIterator.h"
>> #include "Trace.h"
>>
>> +#if defined(_AIX) && defined(open)
>> +#undef open
>> +#endif
>> +
>> /* The "header" consists of a jint opcode and a jint span count value */
>> #define INTS_PER_HEADER 2
>> #define BYTES_PER_HEADER 8
>
>> @MBaesken So my fix in [25c691d](https://github.com/openjdk/jdk/pull/17538/commits/25c691df823eb9d9db1451637f28d59dd9508386) did not help? Maybe then it is some other system library that drags in `fcntl.h`; I assumed it was stdlib or stdio. That header file includes way too much that it does not need, so we can surely strip it of even more standard includes if that is what is required to fix this.
>
>
> Unfortunately it did not help.
> @MBaesken How annoying. :( I have now tried to remove _all_ system includes from `debug_util.h`. Can you please try again building debug on AIX, to see if it works without the `#undef` in `BufferedRenderPipe.c`?
The AIX (fast)debug build still fails .
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17538#issuecomment-1921645170
From ihse at openjdk.org Thu Feb 1 16:21:05 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Thu, 1 Feb 2024 16:21:05 GMT
Subject: RFR: 8324539: Do not use LFS64 symbols in JDK libs [v4]
In-Reply-To:
References:
Message-ID: <1wzw4p_VVMn-Qkb6utSVBVN4HDK9uwRnr3MGDsxi51A=.5028d021-ecd3-45af-a9a1-2033a897cf9b@github.com>
On Thu, 1 Feb 2024 12:13:08 GMT, Alan Bateman wrote:
> Can you confirm that you've run tier1-4 at least? Some of the library code that is changed here is not tested in the lower tiers.
I have run tier1-4 now, and it passes (bar the tests that are currently failing in mainline). However, this only tests 64-bit builds, and these changes do not affect 64-bit builds, only 32-bit linux. So the tier1-4 is more of a sanity check that I did not inadvertenly broke any 64-bit code.
To really test that this works properly, a 32-bit linux with an assortment of operations on > 2GB files would be needed. To the best of my knowledge, we have no such test environment available, and I could not even try to think of how to create such a test setup that does anything useful. (That is, if I even were to spend any time on creating new tests for 32-bit platforms...)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17538#issuecomment-1921697168
From duke at openjdk.org Thu Feb 1 20:14:08 2024
From: duke at openjdk.org (duke)
Date: Thu, 1 Feb 2024 20:14:08 GMT
Subject: Withdrawn: JDK-8313790: [arm32] Specify -marm when building without an
ABI profile
In-Reply-To: <2KwZHmY7EQ4-dYtFkJSRyICBMybr2gibiut7JSqiPlA=.956137f5-635d-4a90-9b85-bcc834744fe5@github.com>
References: <2KwZHmY7EQ4-dYtFkJSRyICBMybr2gibiut7JSqiPlA=.956137f5-635d-4a90-9b85-bcc834744fe5@github.com>
Message-ID:
On Fri, 4 Aug 2023 16:17:04 GMT, Thomas Stuefe wrote:
> See [JDK-8288719](https://bugs.openjdk.org/browse/JDK-8288719) and subsequent [discussion](https://mail.openjdk.org/pipermail/build-dev/2022-May/034635.html) back in 2022.
>
> On Arm, we can generate either arm- or thumb-code (`-marm` or `-mthumb`).
>
> At the moment, if we don't specify an ABI profile (`--with_abi_profile`) when configuring the build, we call gcc without `-marm` or `-mthumb`. Then we use whatever the toolchain defaults too, which is pretty much random (it depends on how the toolchain itself had been built). That can cause really rare but tricky problems when combining static assembly and C++ code (See e.g. JDK-8288719).
>
> I propose to always specify `-marm` as default, unless an ABI profile is given, to prevent such errors.
>
> Thanks to @marchof for testing this.
This pull request has been closed without being integrated.
-------------
PR: https://git.openjdk.org/jdk/pull/15162
From darcy at openjdk.org Thu Feb 1 21:16:24 2024
From: darcy at openjdk.org (Joe Darcy)
Date: Thu, 1 Feb 2024 21:16:24 GMT
Subject: RFR: JDK-8325148: Enable restricted javac warning in java.base
Message-ID: <8zJEeLqHKWm91gZPlYNBVP_5qDXhQgh7g2sWgLXFp3k=.8404dccf-c5a3-4d13-9227-39fc3696f3a5@github.com>
The restricted javac warning is disabled for java.base, but could be enabled by suppressing the warning in a handful of files.
-------------
Commit messages:
- JDK-8325148: Enable restricted javac warning in java.base
Changes: https://git.openjdk.org/jdk/pull/17677/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17677&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8325148
Stats: 26 lines in 9 files changed: 10 ins; 0 del; 16 mod
Patch: https://git.openjdk.org/jdk/pull/17677.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17677/head:pull/17677
PR: https://git.openjdk.org/jdk/pull/17677
From erikj at openjdk.org Thu Feb 1 21:30:01 2024
From: erikj at openjdk.org (Erik Joelsson)
Date: Thu, 1 Feb 2024 21:30:01 GMT
Subject: RFR: JDK-8325148: Enable restricted javac warning in java.base
In-Reply-To: <8zJEeLqHKWm91gZPlYNBVP_5qDXhQgh7g2sWgLXFp3k=.8404dccf-c5a3-4d13-9227-39fc3696f3a5@github.com>
References: <8zJEeLqHKWm91gZPlYNBVP_5qDXhQgh7g2sWgLXFp3k=.8404dccf-c5a3-4d13-9227-39fc3696f3a5@github.com>
Message-ID: <4znJHUj228pJIUQcDaUteF1uD8WxW14V1dQhlQBCQ9s=.9b2df0f8-c154-43c4-8e64-6900baac4a32@github.com>
On Thu, 1 Feb 2024 21:10:48 GMT, Joe Darcy wrote:
> The restricted javac warning is disabled for java.base, but could be enabled by suppressing the warning in a handful of files.
Marked as reviewed by erikj (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/17677#pullrequestreview-1857672295
From jjg at openjdk.org Thu Feb 1 21:44:26 2024
From: jjg at openjdk.org (Jonathan Gibbons)
Date: Thu, 1 Feb 2024 21:44:26 GMT
Subject: RFR: JDK-8298405: Support Markdown in Documentation Comments [v16]
In-Reply-To:
References:
Message-ID:
> Please review a patch to add support for Markdown syntax in documentation comments, as described in the associated JEP.
>
> Notable features:
>
> * support for `///` documentation comments in `JavaTokenizer`
> * new module `jdk.internal.md` -- a private copy of the `commonmark-java` library
> * updates to `DocCommentParser` to treat `///` comments as Markdown
> * updates to the standard doclet to render Markdown comments in HTML
Jonathan Gibbons has updated the pull request incrementally with one additional commit since the last revision:
add info about provenance of `jdk.internal.md` module
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/16388/files
- new: https://git.openjdk.org/jdk/pull/16388/files/54d40b20..b02d4675
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=16388&range=15
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=16388&range=14-15
Stats: 19 lines in 1 file changed: 19 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/16388.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/16388/head:pull/16388
PR: https://git.openjdk.org/jdk/pull/16388
From jjg at openjdk.org Thu Feb 1 21:44:26 2024
From: jjg at openjdk.org (Jonathan Gibbons)
Date: Thu, 1 Feb 2024 21:44:26 GMT
Subject: RFR: JDK-8298405: Support Markdown in Documentation Comments [v15]
In-Reply-To:
References:
Message-ID:
On Thu, 1 Feb 2024 01:12:52 GMT, Jonathan Gibbons wrote:
>> Please review a patch to add support for Markdown syntax in documentation comments, as described in the associated JEP.
>>
>> Notable features:
>>
>> * support for `///` documentation comments in `JavaTokenizer`
>> * new module `jdk.internal.md` -- a private copy of the `commonmark-java` library
>> * updates to `DocCommentParser` to treat `///` comments as Markdown
>> * updates to the standard doclet to render Markdown comments in HTML
>
> Jonathan Gibbons has updated the pull request incrementally with four additional commits since the last revision:
>
> - MarkdownTransformer: tweak doc comments
> - MarkdownTransformer: change `Lower.replaceIter` to be `private final`
> - MarkdownTransformer: use suggested text for using streams
> - remove obsolete debug code
> On CommonMark.
>
> * `jdk.internal.md` contains 133 files, the vast majority of which are from commonmark-java 0.21.0. According to https://github.com/commonmark/commonmark-java/releases 0.21.0 is the latest/current release; good.
> Questions:
>
> * Did we take the tagged commit or mainline at some point after the tagged commit? If it's the latter, we need to take the tagged version.
> * What's the difference between those commonmark-java files in this PR and official commonmark-java? In other words, how do we adapt them? It would be nice to have a description of the procedure or a script to update those files.
> * `jdk.internal.md` exports packages to `jdk.jshell`. A question for @lahodaj, who maintains `jdk.jshell`: when do we need to create a new PR similar to that withdrawn [8299902: Support for MarkDown javadoc in JShell?#11936](https://github.com/openjdk/jdk/pull/11936)?
Added comment to `jdk.internal.md` `module-info.java`
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16388#issuecomment-1922295907
From jvernee at openjdk.org Thu Feb 1 22:04:01 2024
From: jvernee at openjdk.org (Jorn Vernee)
Date: Thu, 1 Feb 2024 22:04:01 GMT
Subject: RFR: JDK-8325148: Enable restricted javac warning in java.base
In-Reply-To: <8zJEeLqHKWm91gZPlYNBVP_5qDXhQgh7g2sWgLXFp3k=.8404dccf-c5a3-4d13-9227-39fc3696f3a5@github.com>
References: <8zJEeLqHKWm91gZPlYNBVP_5qDXhQgh7g2sWgLXFp3k=.8404dccf-c5a3-4d13-9227-39fc3696f3a5@github.com>
Message-ID:
On Thu, 1 Feb 2024 21:10:48 GMT, Joe Darcy wrote:
> The restricted javac warning is disabled for java.base, but could be enabled by suppressing the warning in a handful of files.
This looks good to me. It will be easier to find where we are doing restricted operations like this.
-------------
Marked as reviewed by jvernee (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/17677#pullrequestreview-1857741290
From darcy at openjdk.org Thu Feb 1 22:19:26 2024
From: darcy at openjdk.org (Joe Darcy)
Date: Thu, 1 Feb 2024 22:19:26 GMT
Subject: RFR: JDK-8325148: Enable restricted javac warning in java.base
[v2]
In-Reply-To: <8zJEeLqHKWm91gZPlYNBVP_5qDXhQgh7g2sWgLXFp3k=.8404dccf-c5a3-4d13-9227-39fc3696f3a5@github.com>
References: <8zJEeLqHKWm91gZPlYNBVP_5qDXhQgh7g2sWgLXFp3k=.8404dccf-c5a3-4d13-9227-39fc3696f3a5@github.com>
Message-ID:
> The restricted javac warning is disabled for java.base, but could be enabled by suppressing the warning in a handful of files.
Joe Darcy has updated the pull request incrementally with one additional commit since the last revision:
Add comment highlighting restricted method calls.
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/17677/files
- new: https://git.openjdk.org/jdk/pull/17677/files/4973b1fb..9ac261c0
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=17677&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=17677&range=00-01
Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/17677.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17677/head:pull/17677
PR: https://git.openjdk.org/jdk/pull/17677
From darcy at openjdk.org Thu Feb 1 22:19:26 2024
From: darcy at openjdk.org (Joe Darcy)
Date: Thu, 1 Feb 2024 22:19:26 GMT
Subject: RFR: JDK-8325148: Enable restricted javac warning in java.base
[v2]
In-Reply-To:
References: <8zJEeLqHKWm91gZPlYNBVP_5qDXhQgh7g2sWgLXFp3k=.8404dccf-c5a3-4d13-9227-39fc3696f3a5@github.com>
Message-ID:
On Thu, 1 Feb 2024 22:01:49 GMT, Jorn Vernee wrote:
> This looks good to me. It will be easier to find where we are doing restricted operations like this.
Right; follows the recommended approach of minimizing the scope of the SuppressWarnings annotations too. Thanks.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17677#issuecomment-1922360484
From jjg at openjdk.org Thu Feb 1 22:27:14 2024
From: jjg at openjdk.org (Jonathan Gibbons)
Date: Thu, 1 Feb 2024 22:27:14 GMT
Subject: RFR: JDK-8298405: Support Markdown in Documentation Comments [v16]
In-Reply-To:
References:
<0pRMUgBnvCfb7DTm_pDnIlmuYdXH8URKFAIk5cT082Y=.f4c324b6-ef98-41b3-9b06-9cb82e03b08f@github.com>
Message-ID:
On Tue, 30 Jan 2024 23:07:46 GMT, Jonathan Gibbons wrote:
>> src/jdk.compiler/share/classes/com/sun/tools/javac/tree/DocTreeMaker.java line 572:
>>
>>> 570: }
>>> 571:
>>> 572: case TEXT -> {
>>
>> I haven't looked at `SentenceBreaker` in detail, but one thing that bothers me is that it sees a comment before that comment has been transformed. This means that `///` comments might not "feel" like Markdown to authors.
>
> First up: I do not understand your second sentence: _This means that /// comments might not "feel" like Markdown to authors._ Please rephrase or clarify that.
>
> That aside, there's a big case of chickens and eggs here. The API assumes that the first sentence is distinct from the rest of the description, so we cannot transform it at that early stage. But generally, the first sentence is supposed to be reasonably simple text, and for cases where it is not, you can use the `summary` tag to circumvent any use of the sentence breaker.
>
> Bottom line, I do not see any cause for concern at this time.
To add to that, regarding this:
> but one thing that bothers me is that it sees a comment before that comment has been transformed
I don't think we should support any transformations (i.e. custom extensions to Markdown) that would affect the detection of the end of the first sentence. As of this review, the only custom extension is for enhanced links which simply infer link definitions for appropriate reference links. If there is anything that is worth checking, it is the handling of any links, including reference links, in the first sentence.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16388#discussion_r1475229987
From jjg at openjdk.org Fri Feb 2 00:51:32 2024
From: jjg at openjdk.org (Jonathan Gibbons)
Date: Fri, 2 Feb 2024 00:51:32 GMT
Subject: RFR: JDK-8298405: Support Markdown in Documentation Comments [v17]
In-Reply-To:
References:
Message-ID:
> Please review a patch to add support for Markdown syntax in documentation comments, as described in the associated JEP.
>
> Notable features:
>
> * support for `///` documentation comments in `JavaTokenizer`
> * new module `jdk.internal.md` -- a private copy of the `commonmark-java` library
> * updates to `DocCommentParser` to treat `///` comments as Markdown
> * updates to the standard doclet to render Markdown comments in HTML
Jonathan Gibbons has updated the pull request incrementally with one additional commit since the last revision:
updates for "first sentence" issues and tests
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/16388/files
- new: https://git.openjdk.org/jdk/pull/16388/files/b02d4675..f086aaab
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=16388&range=16
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=16388&range=15-16
Stats: 133 lines in 2 files changed: 133 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/16388.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/16388/head:pull/16388
PR: https://git.openjdk.org/jdk/pull/16388
From mcimadamore at openjdk.org Fri Feb 2 05:36:01 2024
From: mcimadamore at openjdk.org (Maurizio Cimadamore)
Date: Fri, 2 Feb 2024 05:36:01 GMT
Subject: RFR: JDK-8325148: Enable restricted javac warning in java.base
[v2]
In-Reply-To:
References: <8zJEeLqHKWm91gZPlYNBVP_5qDXhQgh7g2sWgLXFp3k=.8404dccf-c5a3-4d13-9227-39fc3696f3a5@github.com>
Message-ID: <3AB1PLupLZXqHdZuduNyWoVwqRRGJat55gE4rDXAgIQ=.7b6e6c0d-60f2-47fa-bc40-39aaaf77cd1f@github.com>
On Thu, 1 Feb 2024 22:19:26 GMT, Joe Darcy wrote:
>> The restricted javac warning is disabled for java.base, but could be enabled by suppressing the warning in a handful of files.
>
> Joe Darcy has updated the pull request incrementally with one additional commit since the last revision:
>
> Add comment highlighting restricted method calls.
Looks good - a pity that we cannot disable the warning at the package level - I think it would make sense give blanket approval to the FFM implementation classes. But, even like this it's not too bad. Thanks.
-------------
Marked as reviewed by mcimadamore (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/17677#pullrequestreview-1858347672
From ihse at openjdk.org Fri Feb 2 06:49:05 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Fri, 2 Feb 2024 06:49:05 GMT
Subject: RFR: 8324243: Fix GCC 14 build [v2]
In-Reply-To:
References:
Message-ID:
On Fri, 2 Feb 2024 06:35:26 GMT, Sam James wrote:
>> This fixes building with GCC 14:
>> * Cherry-pick a fix from Harfbuzz upstream
>> * Apply other `-Wcalloc-transposed-args` fixes to the JDK sources
>>
>> -Wcalloc-transposed-args errors out with GCC 14 as the OpenJDK build uses
>> -Werror.
>>
>> The calloc prototype is:
>>
>> void *calloc(size_t nmemb, size_t size);
>>
>>
>> So, just swap the number of members and size arguments to match the prototype, as
>> we're initialising 1 struct of size `sizeof(struct ...)`. GCC then sees we're not
>> doing anything wrong.
>
> Sam James has updated the pull request incrementally with three additional commits since the last revision:
>
> - fix whitespace
> - Revert "harfbuzz: Cherry-pick upstream fix for GCC 14"
>
> This reverts commit acdd606c5d818baa783c6529ea58e66a061ec64a.
> - Conditionally pass -Wno-transposed-calloc-args for bundled harfbuzz
Changes look good from a build perspective, but you need an ok from client as well for java.desktop changes.
-------------
Marked as reviewed by ihse (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/17506#pullrequestreview-1858456679
From ihse at openjdk.org Fri Feb 2 06:55:19 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Fri, 2 Feb 2024 06:55:19 GMT
Subject: RFR: 8324539: Do not use LFS64 symbols in JDK libs [v7]
In-Reply-To:
References:
Message-ID:
> Similar to [JDK-8318696](https://bugs.openjdk.org/browse/JDK-8318696), we should use -D_FILE_OFFSET_BITS=64, and not -D_LARGEFILE64_SOURCE in the JDK native libraries.
Magnus Ihse Bursie has updated the pull request incrementally with one additional commit since the last revision:
Add kludge to BufferedRenderPipe.c for AIX
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/17538/files
- new: https://git.openjdk.org/jdk/pull/17538/files/eb92119e..3c404183
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=17538&range=06
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=17538&range=05-06
Stats: 4 lines in 1 file changed: 4 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/17538.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17538/head:pull/17538
PR: https://git.openjdk.org/jdk/pull/17538
From ihse at openjdk.org Fri Feb 2 06:55:19 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Fri, 2 Feb 2024 06:55:19 GMT
Subject: RFR: 8324539: Do not use LFS64 symbols in JDK libs [v4]
In-Reply-To: <7M86DsSoWaLOQmf_cK6mXD4hTI8NZ356Z7ZRugqETzM=.bb90569d-0386-4498-9f21-d4c7e66f864f@github.com>
References:
<7M86DsSoWaLOQmf_cK6mXD4hTI8NZ356Z7ZRugqETzM=.bb90569d-0386-4498-9f21-d4c7e66f864f@github.com>
Message-ID:
On Thu, 1 Feb 2024 15:54:40 GMT, Matthias Baesken wrote:
>>> @MBaesken So my fix in [25c691d](https://github.com/openjdk/jdk/pull/17538/commits/25c691df823eb9d9db1451637f28d59dd9508386) did not help? Maybe then it is some other system library that drags in `fcntl.h`; I assumed it was stdlib or stdio. That header file includes way too much that it does not need, so we can surely strip it of even more standard includes if that is what is required to fix this.
>>
>>
>> Unfortunately it did not help.
>
>> @MBaesken How annoying. :( I have now tried to remove _all_ system includes from `debug_util.h`. Can you please try again building debug on AIX, to see if it works without the `#undef` in `BufferedRenderPipe.c`?
>
> The AIX (fast)debug build still fails .
@MBaesken Ok, I officially give up. :-( I added your patch from https://github.com/openjdk/jdk/pull/17538#issuecomment-1918699480. I agree that it is not elegant, but at least it works.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17538#issuecomment-1923062901
From duke at openjdk.org Fri Feb 2 07:01:05 2024
From: duke at openjdk.org (Sam James)
Date: Fri, 2 Feb 2024 07:01:05 GMT
Subject: RFR: 8324539: Do not use LFS64 symbols in JDK libs [v7]
In-Reply-To:
References:
Message-ID:
On Fri, 2 Feb 2024 06:55:19 GMT, Magnus Ihse Bursie wrote:
>> Similar to [JDK-8318696](https://bugs.openjdk.org/browse/JDK-8318696), we should use -D_FILE_OFFSET_BITS=64, and not -D_LARGEFILE64_SOURCE in the JDK native libraries.
>
> Magnus Ihse Bursie has updated the pull request incrementally with one additional commit since the last revision:
>
> Add kludge to BufferedRenderPipe.c for AIX
First, huge thanks for doing this. I did have a very rough cut of this locally which I'd put to one side, and you and I have done essentially the same thing (but yours with more tact). That's a positive sign.
> > Can you confirm that you've run tier1-4 at least? Some of the library code that is changed here is not tested in the lower tiers.
>
> I have run tier1-4 now, and it passes (bar the tests that are currently failing in mainline). However, this only tests 64-bit builds, and these changes do not affect 64-bit builds, only 32-bit linux. So the tier1-4 is more of a sanity check that I did not inadvertenly broke any 64-bit code.
>
> To really test that this works properly, a 32-bit linux with an assortment of operations on > 2GB files would be needed. To the best of my knowledge, we have no such test environment available, and I could not even try to think of how to create such a test setup that does anything useful. (That is, if I even were to spend any time on creating new tests for 32-bit platforms...)
Yeah, let's not, I think. The only way of doing this is with libc shims and a huge mess. As long as we have tests which handle > 2GB files in general, and then also we can get someone to run this on a 32-bit system and tell us if the test suite passes as-is, then we're fine.
Really, even if it builds on a 32-bit system with strict `-Werror=x` for pointer conversions and such, then we're OK.
I'll leave comments inline for the rest.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17538#issuecomment-1923093781
From duke at openjdk.org Fri Feb 2 07:05:07 2024
From: duke at openjdk.org (Sam James)
Date: Fri, 2 Feb 2024 07:05:07 GMT
Subject: RFR: 8324539: Do not use LFS64 symbols in JDK libs [v7]
In-Reply-To:
References:
Message-ID:
On Fri, 2 Feb 2024 06:55:19 GMT, Magnus Ihse Bursie wrote:
>> Similar to [JDK-8318696](https://bugs.openjdk.org/browse/JDK-8318696), we should use -D_FILE_OFFSET_BITS=64, and not -D_LARGEFILE64_SOURCE in the JDK native libraries.
>
> Magnus Ihse Bursie has updated the pull request incrementally with one additional commit since the last revision:
>
> Add kludge to BufferedRenderPipe.c for AIX
make/modules/jdk.hotspot.agent/Lib.gmk line 31:
> 29:
> 30: ifeq ($(call isTargetOs, linux), true)
> 31: SA_CFLAGS := -D_FILE_OFFSET_BITS=64
We have two choices to feel a bit more comfortable:
1) We unconditionally `static_assert` in a few places for large `off_t`, or
2) We only do it for platforms we know definitely support F_O_B and aren't AIX (which we've handled separately).
Not sure that's strictly necessary though. Also, if something understands LARGEFILE*_SOURCE, then it probably understood F_O_B, or at least has some macro to control it. Just thinking aloud.
src/java.base/linux/native/libnio/ch/FileDispatcherImpl.c line 94:
> 92: return IOS_UNSUPPORTED_CASE;
> 93:
> 94: loff_t offset = (loff_t)position;
Is this `loff_t` for the benefit of `copy_file_range`?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17538#discussion_r1475635336
PR Review Comment: https://git.openjdk.org/jdk/pull/17538#discussion_r1475636686
From duke at openjdk.org Fri Feb 2 07:10:07 2024
From: duke at openjdk.org (Sam James)
Date: Fri, 2 Feb 2024 07:10:07 GMT
Subject: RFR: 8324539: Do not use LFS64 symbols in JDK libs [v7]
In-Reply-To:
References:
Message-ID:
On Fri, 2 Feb 2024 06:55:19 GMT, Magnus Ihse Bursie wrote:
>> Similar to [JDK-8318696](https://bugs.openjdk.org/browse/JDK-8318696), we should use -D_FILE_OFFSET_BITS=64, and not -D_LARGEFILE64_SOURCE in the JDK native libraries.
>
> Magnus Ihse Bursie has updated the pull request incrementally with one additional commit since the last revision:
>
> Add kludge to BufferedRenderPipe.c for AIX
src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c line 365:
> 363: #else
> 364: // Make sure we link to the 64-bit version of the functions
> 365: my_openat_func = (openat_func*) dlsym(RTLD_DEFAULT, "openat64");
Explain this part to me, if you wouldn't mind? (Why do we keep the `64` variants?)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17538#discussion_r1475642841
From pminborg at openjdk.org Fri Feb 2 07:26:01 2024
From: pminborg at openjdk.org (Per Minborg)
Date: Fri, 2 Feb 2024 07:26:01 GMT
Subject: RFR: JDK-8325148: Enable restricted javac warning in java.base
[v2]
In-Reply-To:
References: <8zJEeLqHKWm91gZPlYNBVP_5qDXhQgh7g2sWgLXFp3k=.8404dccf-c5a3-4d13-9227-39fc3696f3a5@github.com>
Message-ID: <1F2_HcNM-D5F0nOFXlBpBRbPpFQKPPUJxYMoKw4k7Ho=.7c11c0b1-5f4d-475c-b111-e2b0ed207e48@github.com>
On Thu, 1 Feb 2024 22:19:26 GMT, Joe Darcy wrote:
>> The restricted javac warning is disabled for java.base, but could be enabled by suppressing the warning in a handful of files.
>
> Joe Darcy has updated the pull request incrementally with one additional commit since the last revision:
>
> Add comment highlighting restricted method calls.
Nice fix. Thanks.
-------------
Marked as reviewed by pminborg (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/17677#pullrequestreview-1858547285
From kbarrett at openjdk.org Fri Feb 2 09:53:06 2024
From: kbarrett at openjdk.org (Kim Barrett)
Date: Fri, 2 Feb 2024 09:53:06 GMT
Subject: RFR: 8324243: Fix GCC 14 build [v2]
In-Reply-To:
References:
Message-ID:
On Fri, 2 Feb 2024 06:35:26 GMT, Sam James wrote:
>> This fixes building with GCC 14:
>> * Cherry-pick a fix from Harfbuzz upstream
>> * Apply other `-Wcalloc-transposed-args` fixes to the JDK sources
>>
>> -Wcalloc-transposed-args errors out with GCC 14 as the OpenJDK build uses
>> -Werror.
>>
>> The calloc prototype is:
>>
>> void *calloc(size_t nmemb, size_t size);
>>
>>
>> So, just swap the number of members and size arguments to match the prototype, as
>> we're initialising 1 struct of size `sizeof(struct ...)`. GCC then sees we're not
>> doing anything wrong.
>
> Sam James has updated the pull request incrementally with three additional commits since the last revision:
>
> - fix whitespace
> - Revert "harfbuzz: Cherry-pick upstream fix for GCC 14"
>
> This reverts commit acdd606c5d818baa783c6529ea58e66a061ec64a.
> - Conditionally pass -Wno-transposed-calloc-args for bundled harfbuzz
(I'm not a member of the relevant teams, but...)
The changes to calloc calls are plainly an improvement. The new gcc
warnings are correct in the sense of potentially confused code, though
in all of these cases I think it's "harmless".
Just a minor whitespace issue in the build changes.
make/modules/java.desktop/lib/Awt2dLibraries.gmk line 514:
> 512: HARFBUZZ_DISABLED_WARNINGS_CXX_gcc := class-memaccess noexcept-type \
> 513: expansion-to-defined dangling-reference maybe-uninitialized \
> 514: calloc-transposed-args
Inconsistent indentation.
-------------
Marked as reviewed by kbarrett (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/17506#pullrequestreview-1858762113
PR Review Comment: https://git.openjdk.org/jdk/pull/17506#discussion_r1475787093
From ihse at openjdk.org Fri Feb 2 10:53:06 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Fri, 2 Feb 2024 10:53:06 GMT
Subject: RFR: 8314488: Compile the JDK as C++17 [v6]
In-Reply-To:
References:
Message-ID:
On Thu, 11 Jan 2024 13:23:45 GMT, Julian Waters wrote:
>> Compile the JDK as C++17, enabling the use of all C++17 language features
>
> Julian Waters has updated the pull request incrementally with one additional commit since the last revision:
>
> Require clang 13 in toolchain.m4
Nobody complained about raising gcc to 10, see https://mail.openjdk.org/pipermail/build-dev/2024-January/042802.html.
@TheShermanTanker Can you update this PR so it sets the minimum gcc to 10.0 instead of 9.0?
@shipilev Are you okay with us moving forward with this? If not, I'd like to see an concrete example of where this will create a problem, so we can discuss if the general good for the platform can be dictated by that use case.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14988#issuecomment-1923553875
From ihse at openjdk.org Fri Feb 2 11:00:05 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Fri, 2 Feb 2024 11:00:05 GMT
Subject: RFR: 8314488: Compile the JDK as C++17 [v6]
In-Reply-To:
References:
Message-ID:
On Fri, 19 Jan 2024 12:08:21 GMT, Julian Waters wrote:
>> Julian Waters has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Require clang 13 in toolchain.m4
>
> Should I split the compiler upgrades into a different change and integrate that first? Going off the conversation in this thread it would seem like the compiler upgrade would benefit us a lot more than just having C++17 (The noreturn attribute is one big motivating factor for instance) and it might help if the compiler upgrades were not delayed by the discussion of when to jump to C++17
Also, @TheShermanTanker, can you please incorporate this patch that updates the build documentation to match the changes in configure?
diff --git a/doc/building.html b/doc/building.html
index 7fd530e9dbc..bb5fda24ba7 100644
--- a/doc/building.html
+++ b/doc/building.html
@@ -599,14 +599,14 @@ All compilers are expected to be able to handle the C11 language
standard for C, and C++14 for C++.
gcc
-The minimum accepted version of gcc is 6.0. Older versions will not
+
The minimum accepted version of gcc is 10.0. Older versions will not
be accepted by configure
.
The JDK is currently known to compile successfully with gcc version
13.2 or newer.
In general, any version between these two should be usable.
clang
-The minimum accepted version of clang is 3.5. Older versions will not
-be accepted by configure
.
+The minimum accepted version of clang is 13.0. Older versions will
+not be accepted by configure
.
To use clang instead of gcc on Linux, use
--with-toolchain-type=clang
.
Apple Xcode
@@ -672,7 +672,9 @@ Microsoft Visual Studio
BuildTools
, but e.g. Professional
, adjust the
product ID accordingly.
IBM XL C/C++
-Please consult the AIX section of the The minimum accepted version of xlc is 17.1.1.4. Older versions will
+not be accepted by configure
.
+For further information, please consult the AIX section of the Supported
Build Platforms OpenJDK Build Wiki page for details about which
versions of XLC are supported.
diff --git a/doc/building.md b/doc/building.md
index de410439446..9113e0243bd 100644
--- a/doc/building.md
+++ b/doc/building.md
@@ -403,7 +403,7 @@ ## Native Compiler (Toolchain) Requirements
### gcc
-The minimum accepted version of gcc is 6.0. Older versions will not be accepted
+The minimum accepted version of gcc is 10.0. Older versions will not be accepted
by `configure`.
The JDK is currently known to compile successfully with gcc version 13.2 or
@@ -413,7 +413,7 @@ ### gcc
### clang
-The minimum accepted version of clang is 3.5. Older versions will not be
+The minimum accepted version of clang is 13.0. Older versions will not be
accepted by `configure`.
To use clang instead of gcc on Linux, use `--with-toolchain-type=clang`.
@@ -489,9 +489,12 @@ ### Microsoft Visual Studio
### IBM XL C/C++
-Please consult the AIX section of the [Supported Build Platforms](
-https://wiki.openjdk.org/display/Build/Supported+Build+Platforms) OpenJDK Build
-Wiki page for details about which versions of XLC are supported.
+The minimum accepted version of xlc is 17.1.1.4. Older versions will not be
+accepted by `configure`.
+
+For further information, please consult the AIX section of the [Supported Build
+Platforms](https://wiki.openjdk.org/display/Build/Supported+Build+Platforms)
+OpenJDK Build Wiki page for details about which versions of XLC are supported.
## Boot JDK Requirements
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14988#issuecomment-1923565064
From ihse at openjdk.org Fri Feb 2 15:27:12 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Fri, 2 Feb 2024 15:27:12 GMT
Subject: RFR: 8325163: Enable -Wpedantic on clang
Message-ID:
Inspired by (the later backed-out) [JDK-8296115](https://bugs.openjdk.org/browse/JDK-8296115), I propose to enable `-Wpedantic` for clang. This has already found some irregularities in the code, like mistakenly using `#import` instead of `#include`. In this patch, I disable warnings for these individual buggy or badly written files, but I intend to post follow-up issues on the respective teams to have them properly fixed.
Unfortunately, it is not possible to enable `-Wpedantic` on gcc, since individual warnings in `-Wpedantic` cannot be disabled. This means that code like this:
#define DEBUG_ONLY(code) code;
DEBUG_ONLY(foo());
will result in a `; ;`. This breaks the C standard, but is benign, and we use it all over the place. On clang, we can ignore this by `-Wno-extra-semi`, but this is not available on gcc.
-------------
Commit messages:
- 8325163: Enable -Wpedantic on clang
Changes: https://git.openjdk.org/jdk/pull/17687/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17687&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8325163
Stats: 43 lines in 11 files changed: 31 ins; 0 del; 12 mod
Patch: https://git.openjdk.org/jdk/pull/17687.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17687/head:pull/17687
PR: https://git.openjdk.org/jdk/pull/17687
From ihse at openjdk.org Fri Feb 2 15:31:09 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Fri, 2 Feb 2024 15:31:09 GMT
Subject: RFR: 8325176: Compiling native tests with clang on linux fails
Message-ID:
While we do not have automatic testing of using clang instead of gcc on linux, we try to keep it in working condition. This is still the case for the JDK itself, but there is a native test which fails to compile with clang. This should be fixed.
-------------
Commit messages:
- 8325176: Compiling native tests with clang on linux fails
Changes: https://git.openjdk.org/jdk/pull/17688/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17688&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8325176
Stats: 4 lines in 1 file changed: 4 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/17688.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17688/head:pull/17688
PR: https://git.openjdk.org/jdk/pull/17688
From ihse at openjdk.org Fri Feb 2 15:41:00 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Fri, 2 Feb 2024 15:41:00 GMT
Subject: RFR: 8325176: Compiling native tests with clang on linux fails
In-Reply-To:
References:
Message-ID: <-UbEG83ZKJEE7NjKZtEB8am45RRLs-sxqje0Hoo85Kg=.2f2a462b-df5a-4c6f-8e96-6e9b319b6f29@github.com>
On Fri, 2 Feb 2024 15:27:39 GMT, Magnus Ihse Bursie wrote:
> While we do not have automatic testing of using clang instead of gcc on linux, we try to keep it in working condition. This is still the case for the JDK itself, but there is a native test which fails to compile with clang. This should be fixed.
The errors reported are:
/localhome/git/jdk-BAR/closed/test/jdk/java/awt/sizecalc/SafeAllocationTest/libSafeAllocationTest.c:75:13: error: format specifies type 'unsigned long long' but the argument has type 'int64_t' (aka 'long') [-Werror,-Wformat]
m, n, allocated);
^
/localhome/git/jdk-BAR/closed/test/jdk/java/awt/sizecalc/SafeAllocationTest/libSafeAllocationTest.c:75:16: error: format specifies type 'unsigned long long' but the argument has type 'int64_t' (aka 'long') [-Werror,-Wformat]
m, n, allocated);
There seem to be some underlying type confusion. A (probably better) alternative to hiding the warning is to actually fix the problem. I'll leave that question up for the client team to decide if they want to address this.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17688#issuecomment-1924119343
From ihse at openjdk.org Fri Feb 2 15:48:00 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Fri, 2 Feb 2024 15:48:00 GMT
Subject: RFR: JDK-8325148: Enable restricted javac warning in java.base
[v2]
In-Reply-To:
References: <8zJEeLqHKWm91gZPlYNBVP_5qDXhQgh7g2sWgLXFp3k=.8404dccf-c5a3-4d13-9227-39fc3696f3a5@github.com>
Message-ID:
On Thu, 1 Feb 2024 22:19:26 GMT, Joe Darcy wrote:
>> The restricted javac warning is disabled for java.base, but could be enabled by suppressing the warning in a handful of files.
>
> Joe Darcy has updated the pull request incrementally with one additional commit since the last revision:
>
> Add comment highlighting restricted method calls.
Great, thanks for cleaning up!
-------------
Marked as reviewed by ihse (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/17677#pullrequestreview-1859561572
From ihse at openjdk.org Fri Feb 2 15:53:07 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Fri, 2 Feb 2024 15:53:07 GMT
Subject: RFR: 8324539: Do not use LFS64 symbols in JDK libs [v7]
In-Reply-To:
References:
Message-ID: <160IUiEFfgHTenlTpN4C2yL2oMdZPpV1fsK0YysXcr8=.cf71797d-9e10-4713-804e-368b481efde0@github.com>
On Fri, 2 Feb 2024 07:02:43 GMT, Sam James wrote:
>> Magnus Ihse Bursie has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Add kludge to BufferedRenderPipe.c for AIX
>
> src/java.base/linux/native/libnio/ch/FileDispatcherImpl.c line 94:
>
>> 92: return IOS_UNSUPPORTED_CASE;
>> 93:
>> 94: loff_t offset = (loff_t)position;
>
> Is this `loff_t` for the benefit of `copy_file_range`?
That is how copy_file_range is defined. The cast to off64_t was technically incorrect (but they ended up being the same type).
> src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c line 365:
>
>> 363: #else
>> 364: // Make sure we link to the 64-bit version of the functions
>> 365: my_openat_func = (openat_func*) dlsym(RTLD_DEFAULT, "openat64");
>
> Explain this part to me, if you wouldn't mind? (Why do we keep the `64` variants?)
I wrote earlier:
> There is one change that merit highlighting: In src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c, I kept the dlsym lookup for openat64, fstatat64 and fdopendir64, on non-BSD OSes (i.e. Linux and AIX), and on AIX, respectively. This seems to me to be the safest choice, as we do not need to know if a lookup of openat would yield a 32-bit or a 64-bit version. (I frankly don't know, but I'm guessing it would yield the 32-bit version.)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17538#discussion_r1476232283
PR Review Comment: https://git.openjdk.org/jdk/pull/17538#discussion_r1476229335
From ihse at openjdk.org Fri Feb 2 15:53:08 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Fri, 2 Feb 2024 15:53:08 GMT
Subject: RFR: 8324539: Do not use LFS64 symbols in JDK libs [v7]
In-Reply-To: <160IUiEFfgHTenlTpN4C2yL2oMdZPpV1fsK0YysXcr8=.cf71797d-9e10-4713-804e-368b481efde0@github.com>
References:
<160IUiEFfgHTenlTpN4C2yL2oMdZPpV1fsK0YysXcr8=.cf71797d-9e10-4713-804e-368b481efde0@github.com>
Message-ID:
On Fri, 2 Feb 2024 15:48:04 GMT, Magnus Ihse Bursie wrote:
>> src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c line 365:
>>
>>> 363: #else
>>> 364: // Make sure we link to the 64-bit version of the functions
>>> 365: my_openat_func = (openat_func*) dlsym(RTLD_DEFAULT, "openat64");
>>
>> Explain this part to me, if you wouldn't mind? (Why do we keep the `64` variants?)
>
> I wrote earlier:
>
>> There is one change that merit highlighting: In src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c, I kept the dlsym lookup for openat64, fstatat64 and fdopendir64, on non-BSD OSes (i.e. Linux and AIX), and on AIX, respectively. This seems to me to be the safest choice, as we do not need to know if a lookup of openat would yield a 32-bit or a 64-bit version. (I frankly don't know, but I'm guessing it would yield the 32-bit version.)
Basically, my understanding is that a call to "openat" in the source file will be converted into a call to openat64 on 32-bit platforms. When we look up the function using dlsym, I assume we need to find the 64-bit version directly.
Even if this is incorrect, it seems at least *safe* to do it this way.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17538#discussion_r1476231574
From jwaters at openjdk.org Fri Feb 2 15:58:00 2024
From: jwaters at openjdk.org (Julian Waters)
Date: Fri, 2 Feb 2024 15:58:00 GMT
Subject: RFR: 8325163: Enable -Wpedantic on clang
In-Reply-To:
References:
Message-ID:
On Fri, 2 Feb 2024 15:22:03 GMT, Magnus Ihse Bursie wrote:
> Inspired by (the later backed-out) [JDK-8296115](https://bugs.openjdk.org/browse/JDK-8296115), I propose to enable `-Wpedantic` for clang. This has already found some irregularities in the code, like mistakenly using `#import` instead of `#include`. In this patch, I disable warnings for these individual buggy or badly written files, but I intend to post follow-up issues on the respective teams to have them properly fixed.
>
> Unfortunately, it is not possible to enable `-Wpedantic` on gcc, since individual warnings in `-Wpedantic` cannot be disabled. This means that code like this:
>
>
> #define DEBUG_ONLY(code) code;
>
> DEBUG_ONLY(foo());
>
>
> will result in a `; ;`. This breaks the C standard, but is benign, and we use it all over the place. On clang, we can ignore this by `-Wno-extra-semi`, but this is not available on gcc.
+++++1 for this, anything to help Standard conformance is great! Just a few questions...
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17687#issuecomment-1924155329
From jwaters at openjdk.org Fri Feb 2 16:03:01 2024
From: jwaters at openjdk.org (Julian Waters)
Date: Fri, 2 Feb 2024 16:03:01 GMT
Subject: RFR: 8325163: Enable -Wpedantic on clang
In-Reply-To:
References:
Message-ID:
On Fri, 2 Feb 2024 15:22:03 GMT, Magnus Ihse Bursie wrote:
> Inspired by (the later backed-out) [JDK-8296115](https://bugs.openjdk.org/browse/JDK-8296115), I propose to enable `-Wpedantic` for clang. This has already found some irregularities in the code, like mistakenly using `#import` instead of `#include`. In this patch, I disable warnings for these individual buggy or badly written files, but I intend to post follow-up issues on the respective teams to have them properly fixed.
>
> Unfortunately, it is not possible to enable `-Wpedantic` on gcc, since individual warnings in `-Wpedantic` cannot be disabled. This means that code like this:
>
>
> #define DEBUG_ONLY(code) code;
>
> DEBUG_ONLY(foo());
>
>
> will result in a `; ;`. This breaks the C standard, but is benign, and we use it all over the place. On clang, we can ignore this by `-Wno-extra-semi`, but this is not available on gcc.
Guess I could work on the gcc counterpart and find a way around the inability to disable -Wpedantic with it in tandem with this change...
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17687#issuecomment-1924163226
From ihse at openjdk.org Fri Feb 2 15:57:07 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Fri, 2 Feb 2024 15:57:07 GMT
Subject: RFR: 8324539: Do not use LFS64 symbols in JDK libs [v7]
In-Reply-To:
References:
Message-ID:
On Fri, 2 Feb 2024 07:01:33 GMT, Sam James wrote:
>> Magnus Ihse Bursie has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Add kludge to BufferedRenderPipe.c for AIX
>
> make/modules/jdk.hotspot.agent/Lib.gmk line 31:
>
>> 29:
>> 30: ifeq ($(call isTargetOs, linux), true)
>> 31: SA_CFLAGS := -D_FILE_OFFSET_BITS=64
>
> We have two choices to feel a bit more comfortable:
> 1) We unconditionally `static_assert` in a few places for large `off_t`, or
> 2) We only do it for platforms we know definitely support F_O_B and aren't AIX (which we've handled separately).
>
> Not sure that's strictly necessary though. Also, if something understands LARGEFILE*_SOURCE, then it probably understood F_O_B, or at least has some macro to control it. Just thinking aloud.
I'm guessing your comment was really more general, and just happened to be placed here? The reason I am removing `-D_FILE_OFFSET_BITS=64` here is that it is always set for all JDK compilations.
1. I don't know why you would not trust that compiler flags in the build system would work, but if you really want to add a static_assert, let me know where you want it.
2. No, AIX is not handled separately. It is handled as part of this PR. You are probably thinking about JDK-8324834, but that was only about Hotspot. This PR is about all the other JDK native libraries.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17538#discussion_r1476236956
From darcy at openjdk.org Fri Feb 2 17:50:24 2024
From: darcy at openjdk.org (Joe Darcy)
Date: Fri, 2 Feb 2024 17:50:24 GMT
Subject: RFR: JDK-8325148: Enable restricted javac warning in java.base
[v3]
In-Reply-To: <8zJEeLqHKWm91gZPlYNBVP_5qDXhQgh7g2sWgLXFp3k=.8404dccf-c5a3-4d13-9227-39fc3696f3a5@github.com>
References: <8zJEeLqHKWm91gZPlYNBVP_5qDXhQgh7g2sWgLXFp3k=.8404dccf-c5a3-4d13-9227-39fc3696f3a5@github.com>
Message-ID:
> The restricted javac warning is disabled for java.base, but could be enabled by suppressing the warning in a handful of files.
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 three additional commits since the last revision:
- Merge branch 'master' into JDK-8325148
- Add comment highlighting restricted method calls.
- JDK-8325148: Enable restricted javac warning in java.base
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/17677/files
- new: https://git.openjdk.org/jdk/pull/17677/files/9ac261c0..23c93895
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=17677&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=17677&range=01-02
Stats: 521 lines in 20 files changed: 317 ins; 95 del; 109 mod
Patch: https://git.openjdk.org/jdk/pull/17677.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17677/head:pull/17677
PR: https://git.openjdk.org/jdk/pull/17677
From darcy at openjdk.org Fri Feb 2 17:50:24 2024
From: darcy at openjdk.org (Joe Darcy)
Date: Fri, 2 Feb 2024 17:50:24 GMT
Subject: Integrated: JDK-8325148: Enable restricted javac warning in java.base
In-Reply-To: <8zJEeLqHKWm91gZPlYNBVP_5qDXhQgh7g2sWgLXFp3k=.8404dccf-c5a3-4d13-9227-39fc3696f3a5@github.com>
References: <8zJEeLqHKWm91gZPlYNBVP_5qDXhQgh7g2sWgLXFp3k=.8404dccf-c5a3-4d13-9227-39fc3696f3a5@github.com>
Message-ID:
On Thu, 1 Feb 2024 21:10:48 GMT, Joe Darcy wrote:
> The restricted javac warning is disabled for java.base, but could be enabled by suppressing the warning in a handful of files.
This pull request has now been integrated.
Changeset: adc36040
Author: Joe Darcy
URL: https://git.openjdk.org/jdk/commit/adc36040278049b118ea49fba41cb4bcfb9b85f2
Stats: 28 lines in 9 files changed: 10 ins; 0 del; 18 mod
8325148: Enable restricted javac warning in java.base
Reviewed-by: erikj, jvernee, mcimadamore, pminborg, ihse
-------------
PR: https://git.openjdk.org/jdk/pull/17677
From erikj at openjdk.org Fri Feb 2 19:15:02 2024
From: erikj at openjdk.org (Erik Joelsson)
Date: Fri, 2 Feb 2024 19:15:02 GMT
Subject: RFR: 8325163: Enable -Wpedantic on clang
In-Reply-To:
References:
Message-ID:
On Fri, 2 Feb 2024 15:22:03 GMT, Magnus Ihse Bursie wrote:
> Inspired by (the later backed-out) [JDK-8296115](https://bugs.openjdk.org/browse/JDK-8296115), I propose to enable `-Wpedantic` for clang. This has already found some irregularities in the code, like mistakenly using `#import` instead of `#include`. In this patch, I disable warnings for these individual buggy or badly written files, but I intend to post follow-up issues on the respective teams to have them properly fixed.
>
> Unfortunately, it is not possible to enable `-Wpedantic` on gcc, since individual warnings in `-Wpedantic` cannot be disabled. This means that code like this:
>
>
> #define DEBUG_ONLY(code) code;
>
> DEBUG_ONLY(foo());
>
>
> will result in a `; ;`. This breaks the C standard, but is benign, and we use it all over the place. On clang, we can ignore this by `-Wno-extra-semi`, but this is not available on gcc.
Marked as reviewed by erikj (Reviewer).
Looks like GHA found some more issues.
-------------
PR Review: https://git.openjdk.org/jdk/pull/17687#pullrequestreview-1860130881
PR Review: https://git.openjdk.org/jdk/pull/17687#pullrequestreview-1860132459
From darcy at openjdk.org Fri Feb 2 23:41:11 2024
From: darcy at openjdk.org (Joe Darcy)
Date: Fri, 2 Feb 2024 23:41:11 GMT
Subject: RFR: JDK-8325189: Enable this-escape javac warning in java.base
Message-ID:
After the "this-escape" lint warning was added to javac (JDK-8015831), the base module was not updated to be able to compile with this warning enabled. This PR makes the necessary changes to allow the base module to build with the warning enabled.
-------------
Commit messages:
- JDK-8325189: Enable this-escape javac warning in java.base
Changes: https://git.openjdk.org/jdk/pull/17692/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17692&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8325189
Stats: 151 lines in 93 files changed: 149 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/17692.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17692/head:pull/17692
PR: https://git.openjdk.org/jdk/pull/17692
From darcy at openjdk.org Fri Feb 2 23:41:11 2024
From: darcy at openjdk.org (Joe Darcy)
Date: Fri, 2 Feb 2024 23:41:11 GMT
Subject: RFR: JDK-8325189: Enable this-escape javac warning in java.base
In-Reply-To:
References:
Message-ID:
On Fri, 2 Feb 2024 23:36:41 GMT, Joe Darcy wrote:
> After the "this-escape" lint warning was added to javac (JDK-8015831), the base module was not updated to be able to compile with this warning enabled. This PR makes the necessary changes to allow the base module to build with the warning enabled.
In its initial form, the changes are tested on Linux. Later on, I'll do cross-platform builds to make sure there aren't any, say, windows-specific changes that are needed as well.
I can file a follow-up umbrella bug with the original list of ~200 warnings so the constructors and initializers in question can be examined to see if they should be updated.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17692#issuecomment-1924907536
From darcy at openjdk.org Sat Feb 3 01:37:03 2024
From: darcy at openjdk.org (Joe Darcy)
Date: Sat, 3 Feb 2024 01:37:03 GMT
Subject: RFR: JDK-8325189: Enable this-escape javac warning in java.base
In-Reply-To:
References:
Message-ID:
On Fri, 2 Feb 2024 23:38:41 GMT, Joe Darcy wrote:
> In its initial form, the changes are tested on Linux. Later on, I'll do cross-platform builds to make sure there aren't any, say, windows-specific changes that are needed as well.
>
PS Builds pass on all platforms (linux, mac, and windows) on Oracle's internal build system.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17692#issuecomment-1925001815
From duke at openjdk.org Sat Feb 3 10:07:26 2024
From: duke at openjdk.org (Sam James)
Date: Sat, 3 Feb 2024 10:07:26 GMT
Subject: RFR: 8324243: Fix GCC 14 build [v3]
In-Reply-To:
References:
Message-ID:
> This fixes building with GCC 14:
> * Cherry-pick a fix from Harfbuzz upstream
> * Apply other `-Wcalloc-transposed-args` fixes to the JDK sources
>
> -Wcalloc-transposed-args errors out with GCC 14 as the OpenJDK build uses
> -Werror.
>
> The calloc prototype is:
>
> void *calloc(size_t nmemb, size_t size);
>
>
> So, just swap the number of members and size arguments to match the prototype, as
> we're initialising 1 struct of size `sizeof(struct ...)`. GCC then sees we're not
> doing anything wrong.
Sam James has updated the pull request incrementally with one additional commit since the last revision:
whitespace
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/17506/files
- new: https://git.openjdk.org/jdk/pull/17506/files/ef698d82..ef79e7ab
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=17506&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=17506&range=01-02
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/17506.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17506/head:pull/17506
PR: https://git.openjdk.org/jdk/pull/17506
From gdams at openjdk.org Sat Feb 3 11:34:12 2024
From: gdams at openjdk.org (George Adams)
Date: Sat, 3 Feb 2024 11:34:12 GMT
Subject: RFR: 8325194: GHA: Add macOS M1 testing
Message-ID:
Now that macOS M1 executors are [available in GitHub actions](https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/) it makes sense to move the build to run on M1 (rather than cross-compiled) and also enable testing on the platform.
-------------
Commit messages:
- 8325194: GHA: Add macOS M1 testing
Changes: https://git.openjdk.org/jdk/pull/17694/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17694&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8325194
Stats: 17 lines in 2 files changed: 15 ins; 1 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/17694.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17694/head:pull/17694
PR: https://git.openjdk.org/jdk/pull/17694
From gdams at openjdk.org Sat Feb 3 11:43:23 2024
From: gdams at openjdk.org (George Adams)
Date: Sat, 3 Feb 2024 11:43:23 GMT
Subject: RFR: 8325194: GHA: Add macOS M1 testing [v2]
In-Reply-To:
References:
Message-ID:
> Now that macOS M1 executors are [available in GitHub actions](https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/) it makes sense to move the build to run on M1 (rather than cross-compiled) and also enable testing on the platform.
George Adams has updated the pull request incrementally with one additional commit since the last revision:
fix jtreg action
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/17694/files
- new: https://git.openjdk.org/jdk/pull/17694/files/308f9437..36fefbbc
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=17694&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=17694&range=00-01
Stats: 7 lines in 1 file changed: 6 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/17694.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17694/head:pull/17694
PR: https://git.openjdk.org/jdk/pull/17694
From gdams at openjdk.org Sat Feb 3 11:49:24 2024
From: gdams at openjdk.org (George Adams)
Date: Sat, 3 Feb 2024 11:49:24 GMT
Subject: RFR: 8325194: GHA: Add macOS M1 testing [v3]
In-Reply-To:
References:
Message-ID:
> Now that macOS M1 executors are [available in GitHub actions](https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/) it makes sense to move the build to run on M1 (rather than cross-compiled) and also enable testing on the platform.
George Adams has updated the pull request incrementally with two additional commits since the last revision:
- fix boot JDK URL
- fix boot JDK
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/17694/files
- new: https://git.openjdk.org/jdk/pull/17694/files/36fefbbc..33fe9fa3
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=17694&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=17694&range=01-02
Stats: 6 lines in 2 files changed: 4 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/17694.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17694/head:pull/17694
PR: https://git.openjdk.org/jdk/pull/17694
From clanger at openjdk.org Sat Feb 3 14:12:00 2024
From: clanger at openjdk.org (Christoph Langer)
Date: Sat, 3 Feb 2024 14:12:00 GMT
Subject: RFR: 8325194: GHA: Add macOS M1 testing [v3]
In-Reply-To:
References:
Message-ID:
On Sat, 3 Feb 2024 11:49:24 GMT, George Adams wrote:
>> Now that macOS M1 executors are [available in GitHub actions](https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/) it makes sense to move the build to run on M1 (rather than cross-compiled) and also enable testing on the platform.
>
> George Adams has updated the pull request incrementally with two additional commits since the last revision:
>
> - fix boot JDK URL
> - fix boot JDK
Overall this looks like a good idea.
Do we maybe want to go to 'macos-14' on both MacOS architectures? Maybe do it in a prior, separate change?
Other than that I also think you still need to update a few copyright years.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17694#issuecomment-1925337753
From gdams at openjdk.org Sat Feb 3 16:18:00 2024
From: gdams at openjdk.org (George Adams)
Date: Sat, 3 Feb 2024 16:18:00 GMT
Subject: RFR: 8325194: GHA: Add macOS M1 testing [v3]
In-Reply-To:
References:
Message-ID:
On Sat, 3 Feb 2024 14:09:50 GMT, Christoph Langer wrote:
> Do we maybe want to go to 'macos-14' on both MacOS architectures? Maybe do it in a prior, separate change?
Noting that macos-14 is arm64 only in GitHub so such a change might not be intentional in this scenario.
> Other than that I also think you still need to update a few copyright years.
Yeah I'll check now
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17694#issuecomment-1925371318
From gdams at openjdk.org Sat Feb 3 16:22:14 2024
From: gdams at openjdk.org (George Adams)
Date: Sat, 3 Feb 2024 16:22:14 GMT
Subject: RFR: 8325194: GHA: Add macOS M1 testing [v4]
In-Reply-To:
References:
Message-ID:
> Now that macOS M1 executors are [available in GitHub actions](https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/) it makes sense to move the build to run on M1 (rather than cross-compiled) and also enable testing on the platform.
George Adams has updated the pull request incrementally with one additional commit since the last revision:
update copyright headers
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/17694/files
- new: https://git.openjdk.org/jdk/pull/17694/files/33fe9fa3..5240aed3
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=17694&range=03
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=17694&range=02-03
Stats: 4 lines in 4 files changed: 0 ins; 0 del; 4 mod
Patch: https://git.openjdk.org/jdk/pull/17694.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17694/head:pull/17694
PR: https://git.openjdk.org/jdk/pull/17694
From gdams at openjdk.org Sat Feb 3 21:55:25 2024
From: gdams at openjdk.org (George Adams)
Date: Sat, 3 Feb 2024 21:55:25 GMT
Subject: RFR: 8325194: GHA: Add macOS M1 testing [v5]
In-Reply-To:
References:
Message-ID:
> Now that macOS M1 executors are [available in GitHub actions](https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/) it makes sense to move the build to run on M1 (rather than cross-compiled) and also enable testing on the platform.
George Adams has updated the pull request incrementally with one additional commit since the last revision:
simplify jtreg
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/17694/files
- new: https://git.openjdk.org/jdk/pull/17694/files/5240aed3..acffbee8
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=17694&range=04
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=17694&range=03-04
Stats: 7 lines in 1 file changed: 0 ins; 6 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/17694.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17694/head:pull/17694
PR: https://git.openjdk.org/jdk/pull/17694
From shade at openjdk.org Sat Feb 3 21:55:25 2024
From: shade at openjdk.org (Aleksey Shipilev)
Date: Sat, 3 Feb 2024 21:55:25 GMT
Subject: RFR: 8325194: GHA: Add macOS M1 testing [v4]
In-Reply-To:
References:
Message-ID:
On Sat, 3 Feb 2024 16:22:14 GMT, George Adams wrote:
>> Now that macOS M1 executors are [available in GitHub actions](https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/) it makes sense to move the build to run on M1 (rather than cross-compiled) and also enable testing on the platform.
>
> George Adams has updated the pull request incrementally with one additional commit since the last revision:
>
> update copyright headers
.github/actions/get-jtreg/action.yml line 66:
> 64: fi
> 65: # Build JTReg and move files to the proper locations
> 66: bash make/build.sh --jdk "$JDK"
We did this `JAVA_HOME_17_X64` change for https://github.com/openjdk/jdk/commit/959a61fdd483c9523764b9ba0972f59ca06db0ee, which is partially reverted during upgrade of GH actions. (...and I forgot to revert this hunk, apparently.) I wonder if it would be simpler if we switch back to boot JDK for building jtreg again, which would eliminate this hunk? Might make backports easier too.
I have no strong opinion here, though.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17694#discussion_r1477130456
From gdams at openjdk.org Sat Feb 3 21:55:25 2024
From: gdams at openjdk.org (George Adams)
Date: Sat, 3 Feb 2024 21:55:25 GMT
Subject: RFR: 8325194: GHA: Add macOS M1 testing [v4]
In-Reply-To:
References:
Message-ID:
On Sat, 3 Feb 2024 21:45:27 GMT, Aleksey Shipilev wrote:
>> George Adams has updated the pull request incrementally with one additional commit since the last revision:
>>
>> update copyright headers
>
> .github/actions/get-jtreg/action.yml line 66:
>
>> 64: fi
>> 65: # Build JTReg and move files to the proper locations
>> 66: bash make/build.sh --jdk "$JDK"
>
> We did this `JAVA_HOME_17_X64` change for https://github.com/openjdk/jdk/commit/959a61fdd483c9523764b9ba0972f59ca06db0ee, which is partially reverted during upgrade of GH actions. (...and I forgot to revert this hunk, apparently.) I wonder if it would be simpler if we switch back to boot JDK for building jtreg again, which would eliminate this hunk? Might make backports easier too.
>
> I have no strong opinion here, though.
yeah this does make sense, anything to remove a horrible if statement ??
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17694#discussion_r1477131017
From alanb at openjdk.org Sun Feb 4 06:58:03 2024
From: alanb at openjdk.org (Alan Bateman)
Date: Sun, 4 Feb 2024 06:58:03 GMT
Subject: RFR: JDK-8325189: Enable this-escape javac warning in java.base
In-Reply-To:
References:
Message-ID:
On Fri, 2 Feb 2024 23:36:41 GMT, Joe Darcy wrote:
> After the "this-escape" lint warning was added to javac (JDK-8015831), the base module was not updated to be able to compile with this warning enabled. This PR makes the necessary changes to allow the base module to build with the warning enabled.
I skimmed through the use sites and don't see any issues. There is one bucket of escaping "this" that will go away once the support for running with the SM goes away.
-------------
Marked as reviewed by alanb (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/17692#pullrequestreview-1861282672
From gdams at openjdk.org Sun Feb 4 09:04:03 2024
From: gdams at openjdk.org (George Adams)
Date: Sun, 4 Feb 2024 09:04:03 GMT
Subject: RFR: 8325194: GHA: Add macOS M1 testing [v4]
In-Reply-To:
References:
Message-ID:
On Sat, 3 Feb 2024 21:45:27 GMT, Aleksey Shipilev wrote:
>> George Adams has updated the pull request incrementally with one additional commit since the last revision:
>>
>> update copyright headers
>
> .github/actions/get-jtreg/action.yml line 66:
>
>> 64: fi
>> 65: # Build JTReg and move files to the proper locations
>> 66: bash make/build.sh --jdk "$JDK"
>
> We did this `JAVA_HOME_17_X64` change for https://github.com/openjdk/jdk/commit/959a61fdd483c9523764b9ba0972f59ca06db0ee, which is partially reverted during upgrade of GH actions. (...and I forgot to revert this hunk, apparently.) I wonder if it would be simpler if we switch back to boot JDK for building jtreg again, which would eliminate this hunk? Might make backports easier too.
>
> I have no strong opinion here, though.
@shipilev updated PTAL
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17694#discussion_r1477222603
From jwaters at openjdk.org Sun Feb 4 15:33:04 2024
From: jwaters at openjdk.org (Julian Waters)
Date: Sun, 4 Feb 2024 15:33:04 GMT
Subject: RFR: 8324243: Fix GCC 14 build [v2]
In-Reply-To:
References:
Message-ID:
On Fri, 2 Feb 2024 06:35:26 GMT, Sam James wrote:
>> This fixes building with GCC 14:
>> * ~Cherry-pick a fix from Harfbuzz upstream~
>> * Apply other `-Wcalloc-transposed-args` fixes to the JDK sources
>>
>> -Wcalloc-transposed-args errors out with GCC 14 as the OpenJDK build uses
>> -Werror.
>>
>> The calloc prototype is:
>>
>> void *calloc(size_t nmemb, size_t size);
>>
>>
>> So, just swap the number of members and size arguments to match the prototype, as
>> we're initialising 1 struct of size `sizeof(struct ...)`. GCC then sees we're not
>> doing anything wrong.
>
> Sam James has updated the pull request incrementally with three additional commits since the last revision:
>
> - fix whitespace
> - Revert "harfbuzz: Cherry-pick upstream fix for GCC 14"
>
> This reverts commit acdd606c5d818baa783c6529ea58e66a061ec64a.
> - Conditionally pass -Wno-transposed-calloc-args for bundled harfbuzz
make/modules/java.desktop/lib/Awt2dLibraries.gmk line 514:
> 512: HARFBUZZ_DISABLED_WARNINGS_CXX_gcc := class-memaccess noexcept-type \
> 513: expansion-to-defined dangling-reference maybe-uninitialized \
> 514: calloc-transposed-args
Nit: Align the calloc-transposed-args with the rest of the disabled warnings
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17506#discussion_r1475611942
From jwaters at openjdk.org Sun Feb 4 15:33:05 2024
From: jwaters at openjdk.org (Julian Waters)
Date: Sun, 4 Feb 2024 15:33:05 GMT
Subject: RFR: 8324243: Fix GCC 14 build [v2]
In-Reply-To:
References:
Message-ID:
On Fri, 2 Feb 2024 09:26:28 GMT, Kim Barrett wrote:
>> Sam James has updated the pull request incrementally with three additional commits since the last revision:
>>
>> - fix whitespace
>> - Revert "harfbuzz: Cherry-pick upstream fix for GCC 14"
>>
>> This reverts commit acdd606c5d818baa783c6529ea58e66a061ec64a.
>> - Conditionally pass -Wno-transposed-calloc-args for bundled harfbuzz
>
> make/modules/java.desktop/lib/Awt2dLibraries.gmk line 514:
>
>> 512: HARFBUZZ_DISABLED_WARNINGS_CXX_gcc := class-memaccess noexcept-type \
>> 513: expansion-to-defined dangling-reference maybe-uninitialized \
>> 514: calloc-transposed-args
>
> Inconsistent indentation.
Hey, you stole my line!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17506#discussion_r1475821303
From jwaters at openjdk.org Sun Feb 4 15:33:03 2024
From: jwaters at openjdk.org (Julian Waters)
Date: Sun, 4 Feb 2024 15:33:03 GMT
Subject: RFR: 8324243: Fix GCC 14 build [v3]
In-Reply-To:
References:
Message-ID:
On Sat, 3 Feb 2024 10:07:26 GMT, Sam James wrote:
>> This fixes building with GCC 14:
>> * ~Cherry-pick a fix from Harfbuzz upstream~
>> * Apply other `-Wcalloc-transposed-args` fixes to the JDK sources
>>
>> -Wcalloc-transposed-args errors out with GCC 14 as the OpenJDK build uses
>> -Werror.
>>
>> The calloc prototype is:
>>
>> void *calloc(size_t nmemb, size_t size);
>>
>>
>> So, just swap the number of members and size arguments to match the prototype, as
>> we're initialising 1 struct of size `sizeof(struct ...)`. GCC then sees we're not
>> doing anything wrong.
>
> Sam James has updated the pull request incrementally with one additional commit since the last revision:
>
> whitespace
Marked as reviewed by jwaters (Committer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/17506#pullrequestreview-1858460113
From ihse at openjdk.org Sun Feb 4 17:27:00 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Sun, 4 Feb 2024 17:27:00 GMT
Subject: RFR: 8325163: Enable -Wpedantic on clang
In-Reply-To:
References:
Message-ID:
On Fri, 2 Feb 2024 15:22:03 GMT, Magnus Ihse Bursie wrote:
> Inspired by (the later backed-out) [JDK-8296115](https://bugs.openjdk.org/browse/JDK-8296115), I propose to enable `-Wpedantic` for clang. This has already found some irregularities in the code, like mistakenly using `#import` instead of `#include`. In this patch, I disable warnings for these individual buggy or badly written files, but I intend to post follow-up issues on the respective teams to have them properly fixed.
>
> Unfortunately, it is not possible to enable `-Wpedantic` on gcc, since individual warnings in `-Wpedantic` cannot be disabled. This means that code like this:
>
>
> #define DEBUG_ONLY(code) code;
>
> DEBUG_ONLY(foo());
>
>
> will result in a `; ;`. This breaks the C standard, but is benign, and we use it all over the place. On clang, we can ignore this by `-Wno-extra-semi`, but this is not available on gcc.
Ah, dtrace triggers `dollar-in-identifier-extension`. Of course... *sigh*
I actually had this disabled for hotspot on an earlier version of the patch (that had lied dormant in my personal fork for about a year), but I could not reproduce the problem it was supposed to solve now, so I removed it again. Now I know why I had it.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17687#issuecomment-1925848001
From clanger at openjdk.org Sun Feb 4 22:42:01 2024
From: clanger at openjdk.org (Christoph Langer)
Date: Sun, 4 Feb 2024 22:42:01 GMT
Subject: RFR: 8325194: GHA: Add macOS M1 testing [v5]
In-Reply-To:
References:
Message-ID:
On Sat, 3 Feb 2024 21:55:25 GMT, George Adams wrote:
>> Now that macOS M1 executors are [available in GitHub actions](https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/) it makes sense to move the build to run on M1 (rather than cross-compiled) and also enable testing on the platform.
>
> George Adams has updated the pull request incrementally with one additional commit since the last revision:
>
> simplify jtreg
Looks good to me now. But please let another build group member give give their blessing before integrating.
-------------
Marked as reviewed by clanger (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/17694#pullrequestreview-1861592810
From ihse at openjdk.org Sun Feb 4 22:55:01 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Sun, 4 Feb 2024 22:55:01 GMT
Subject: RFR: 8325163: Enable -Wpedantic on clang
In-Reply-To:
References:
Message-ID: <94Ifly9StBGB9Qnoatj1MLo4txRcerzPx9-D2Am1b7U=.6a80b6f5-50ec-4b63-b1b1-8035fb6948db@github.com>
On Fri, 2 Feb 2024 15:59:56 GMT, Julian Waters wrote:
> Guess I could work on the gcc counterpart and find a way around the inability to disable -Wpedantic with it in tandem with this change...
I don't think that is possible. The double semicolon rule can only be disabled by disabling pedantic completely. This is not the first time we've run into trouble because gcc do not have fine-grained enough warnings. :( (While clang has always excelled in this area.)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17687#issuecomment-1925954578
From kbarrett at openjdk.org Mon Feb 5 03:12:01 2024
From: kbarrett at openjdk.org (Kim Barrett)
Date: Mon, 5 Feb 2024 03:12:01 GMT
Subject: RFR: 8325163: Enable -Wpedantic on clang
In-Reply-To:
References:
Message-ID:
On Fri, 2 Feb 2024 15:22:03 GMT, Magnus Ihse Bursie wrote:
> #define DEBUG_ONLY(code) code;
>
> DEBUG_ONLY(foo());
> ```
>
> will result in a `; ;`. This breaks the C standard, but is benign, and we use it all over the place. On clang, we can ignore this by `-Wno-extra-semi`, but this is not available on gcc.
All of the -Wpedantic warnings for extra ';' in C++ code I looked at look to
me like a gcc bug (or bugs). C++11 added "empty-declaration", which is
permitted anywhere a normal declaration is permitted (C++14 7), as well as for
class member declarations (C++14 9.2).
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96068
seems to have fixed some, but not all, cases. It looks like it only removed
the warnings for empty declarations at namespace scope. I couldn't find
anything for other cases, including empty class member declarations.
I consider the "format '%p' expects argument of type 'void*" warnings to be
not at all helpful. Fortunately we don't use '%p' in HotSpot, but I don't
know how other groups might feel having this inflicted on them.
Because of the vast numbers of those, I ran out of patience trying to find and
examine other warnings triggered by this option.
Based on that, I'm not feeling very keen on this change, at least not for a future
version applying to gcc builds.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17687#issuecomment-1926154325
From kbarrett at openjdk.org Mon Feb 5 03:24:01 2024
From: kbarrett at openjdk.org (Kim Barrett)
Date: Mon, 5 Feb 2024 03:24:01 GMT
Subject: RFR: 8325163: Enable -Wpedantic on clang
In-Reply-To:
References:
Message-ID: <5YoWExp50qGIjilv-9yq38jGsb3Fw7MJCQ8Sfc3Wp3c=.189956da-6f76-4723-9d4a-11d20b43eeb4@github.com>
On Fri, 2 Feb 2024 15:22:03 GMT, Magnus Ihse Bursie wrote:
> Inspired by (the later backed-out) [JDK-8296115](https://bugs.openjdk.org/browse/JDK-8296115), I propose to enable `-Wpedantic` for clang. This has already found some irregularities in the code, like mistakenly using `#import` instead of `#include`. In this patch, I disable warnings for these individual buggy or badly written files, but I intend to post follow-up issues on the respective teams to have them properly fixed.
Rather than first turning on pedantic warnings and then (maybe) going back and perhaps fixing things, I'd really prefer
things be done in the other order. (That's how I handled the recent `-Wparentheses` changes, for example.)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17687#issuecomment-1926164327
From dholmes at openjdk.org Mon Feb 5 06:18:03 2024
From: dholmes at openjdk.org (David Holmes)
Date: Mon, 5 Feb 2024 06:18:03 GMT
Subject: RFR: 8325163: Enable -Wpedantic on clang
In-Reply-To:
References:
Message-ID:
On Mon, 5 Feb 2024 03:07:43 GMT, Kim Barrett wrote:
> I consider the "format '%p' expects argument of type 'void*" warnings to be not at all helpful. Fortunately we don't use '%p' in HotSpot,
We do use it in hotspot. Not a huge amount as we have the legacy format specifiers for PTR_FORMAT etc.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17687#issuecomment-1926298655
From jwaters at openjdk.org Mon Feb 5 07:00:01 2024
From: jwaters at openjdk.org (Julian Waters)
Date: Mon, 5 Feb 2024 07:00:01 GMT
Subject: RFR: 8325163: Enable -Wpedantic on clang
In-Reply-To: <94Ifly9StBGB9Qnoatj1MLo4txRcerzPx9-D2Am1b7U=.6a80b6f5-50ec-4b63-b1b1-8035fb6948db@github.com>
References:
<94Ifly9StBGB9Qnoatj1MLo4txRcerzPx9-D2Am1b7U=.6a80b6f5-50ec-4b63-b1b1-8035fb6948db@github.com>
Message-ID: <_M36efmD8eSGI9KzSC7DJdtQkRnfnA2x7kO0syzXAks=.37fc99bc-9d21-4b48-96fb-b5da431c95ad@github.com>
On Sun, 4 Feb 2024 22:52:19 GMT, Magnus Ihse Bursie wrote:
> > Guess I could work on the gcc counterpart and find a way around the inability to disable -Wpedantic with it in tandem with this change...
>
> I don't think that is possible. The double semicolon rule can only be disabled by disabling pedantic completely. This is not the first time we've run into trouble because gcc do not have fine-grained enough warnings. :( (While clang has always excelled in this area.)
I tried compiling this on both Linux and Windows, and it seems like there are only a few places where the double semicolons are actually a problem (The strangest case was in a NOT_LP64 macro in mallocHeader.hpp where gcc exploded when parsing a perfectly valid semicolon). This is more of a code style cleanliness check than anything, but as Kim said, it is probably a bug within gcc somewhere. I'll file a gcc bug for this in the meantime
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17687#issuecomment-1926339574
From jwaters at openjdk.org Mon Feb 5 07:21:01 2024
From: jwaters at openjdk.org (Julian Waters)
Date: Mon, 5 Feb 2024 07:21:01 GMT
Subject: RFR: 8325163: Enable -Wpedantic on clang
In-Reply-To:
References:
Message-ID:
On Fri, 2 Feb 2024 15:22:03 GMT, Magnus Ihse Bursie wrote:
> Inspired by (the later backed-out) [JDK-8296115](https://bugs.openjdk.org/browse/JDK-8296115), I propose to enable `-Wpedantic` for clang. This has already found some irregularities in the code, like mistakenly using `#import` instead of `#include`. In this patch, I disable warnings for these individual buggy or badly written files, but I intend to post follow-up issues on the respective teams to have them properly fixed.
>
> Unfortunately, it is not possible to enable `-Wpedantic` on gcc, since individual warnings in `-Wpedantic` cannot be disabled. This means that code like this:
>
>
> #define DEBUG_ONLY(code) code;
>
> DEBUG_ONLY(foo());
>
>
> will result in a `; ;`. This breaks the C standard, but is benign, and we use it all over the place. On clang, we can ignore this by `-Wno-extra-semi`, but this is not available on gcc.
Created https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113760
Interestingly a gcc maintainer cannot reproduce the issue at all
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17687#issuecomment-1926361490
From jwaters at openjdk.org Mon Feb 5 07:30:01 2024
From: jwaters at openjdk.org (Julian Waters)
Date: Mon, 5 Feb 2024 07:30:01 GMT
Subject: RFR: 8325163: Enable -Wpedantic on clang
In-Reply-To: <5YoWExp50qGIjilv-9yq38jGsb3Fw7MJCQ8Sfc3Wp3c=.189956da-6f76-4723-9d4a-11d20b43eeb4@github.com>
References:
<5YoWExp50qGIjilv-9yq38jGsb3Fw7MJCQ8Sfc3Wp3c=.189956da-6f76-4723-9d4a-11d20b43eeb4@github.com>
Message-ID: <2KKteHViBJ4B5J2FCpGBFuy1tfoC7kaQWMKq3Ncimes=.d4bed0e1-e307-4b2e-b12e-f495514a4158@github.com>
On Mon, 5 Feb 2024 03:21:35 GMT, Kim Barrett wrote:
>> Inspired by (the later backed-out) [JDK-8296115](https://bugs.openjdk.org/browse/JDK-8296115), I propose to enable `-Wpedantic` for clang. This has already found some irregularities in the code, like mistakenly using `#import` instead of `#include`. In this patch, I disable warnings for these individual buggy or badly written files, but I intend to post follow-up issues on the respective teams to have them properly fixed.
>>
>> Unfortunately, it is not possible to enable `-Wpedantic` on gcc, since individual warnings in `-Wpedantic` cannot be disabled. This means that code like this:
>>
>>
>> #define DEBUG_ONLY(code) code;
>>
>> DEBUG_ONLY(foo());
>>
>>
>> will result in a `; ;`. This breaks the C standard, but is benign, and we use it all over the place. On clang, we can ignore this by `-Wno-extra-semi`, but this is not available on gcc.
>
>> Inspired by (the later backed-out) [JDK-8296115](https://bugs.openjdk.org/browse/JDK-8296115), I propose to enable `-Wpedantic` for clang. This has already found some irregularities in the code, like mistakenly using `#import` instead of `#include`. In this patch, I disable warnings for these individual buggy or badly written files, but I intend to post follow-up issues on the respective teams to have them properly fixed.
>
> Rather than first turning on pedantic warnings and then (maybe) going back and perhaps fixing things, I'd really prefer
> things be done in the other order. (That's how I handled the recent `-Wparentheses` changes, for example.)
@kimbarrett quoting the gcc maintainers
> Yes because the C++ defect report was only for `Spurious semicolons at namespace scope should be allowed`. See https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#569 .
>
>
> ```
> struct f
> {
> int t; ;
> };
> ```
>
> Is not allowed by the C++ standard currently and is a GCC extension, maybe it should have a seperate flag to control that but I am not 100% sure.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17687#issuecomment-1926372614
From mbaesken at openjdk.org Mon Feb 5 08:29:06 2024
From: mbaesken at openjdk.org (Matthias Baesken)
Date: Mon, 5 Feb 2024 08:29:06 GMT
Subject: RFR: 8324539: Do not use LFS64 symbols in JDK libs [v7]
In-Reply-To:
References:
Message-ID: <7R-vR6xRkCutTiGye-lVtYvEjWVKLFYDWFCaj-Drcbc=.963a2048-d87a-4f4e-b93e-79a62b432138@github.com>
On Fri, 2 Feb 2024 06:55:19 GMT, Magnus Ihse Bursie wrote:
>> Similar to [JDK-8318696](https://bugs.openjdk.org/browse/JDK-8318696), we should use -D_FILE_OFFSET_BITS=64, and not -D_LARGEFILE64_SOURCE in the JDK native libraries.
>
> Magnus Ihse Bursie has updated the pull request incrementally with one additional commit since the last revision:
>
> Add kludge to BufferedRenderPipe.c for AIX
I noticed that in the file src/java.base/share/native/libzip/zlib/zconf.h
we seem to still use `off64_t` , is this okay (at most other locations it was replaced)
https://github.com/openjdk/jdk/blob/master/src/java.base/share/native/libzip/zlib/zconf.h#L541
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17538#issuecomment-1926448109
From mdoerr at openjdk.org Mon Feb 5 08:30:04 2024
From: mdoerr at openjdk.org (Martin Doerr)
Date: Mon, 5 Feb 2024 08:30:04 GMT
Subject: RFR: 8314488: Compile the JDK as C++17 [v5]
In-Reply-To:
References:
Message-ID: <0Ga1XPW8G48Dip-k3vLbvFg8sI-ywjcMQytuQRAvSLo=.0cbcfa73-0b32-4ec5-bfbc-a15a27e7f1f2@github.com>
On Thu, 11 Jan 2024 13:04:35 GMT, Julian Waters wrote:
> There is a typo in adlc:
>
> ```
> diff --git a/make/hotspot/gensrc/GensrcAdlc.gmk b/make/hotspot/gensrc/GensrcAdlc.gmk
> index 0898d91e1c2..bb356476847 100644
> --- a/make/hotspot/gensrc/GensrcAdlc.gmk
> +++ b/make/hotspot/gensrc/GensrcAdlc.gmk
> @@ -51,7 +51,7 @@ ifeq ($(call check-jvm-feature, compiler2), true)
> endif
>
> # Set the C++ standard
> - ADLC_CFLAGS += $(ADLC_LANGSTD_CXXFLAG)
> + ADLC_CFLAGS += $(ADLC_LANGSTD_CXXFLAGS)
>
> # NOTE: The old build didn't set -DASSERT for windows but it doesn't seem to
> # hurt.
> ```
Created a PR for that: https://github.com/openjdk/jdk/pull/17705
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14988#issuecomment-1926450195
From mdoerr at openjdk.org Mon Feb 5 08:30:12 2024
From: mdoerr at openjdk.org (Martin Doerr)
Date: Mon, 5 Feb 2024 08:30:12 GMT
Subject: RFR: 8325213: Flags introduced by configure script are not passed to
ADLC build
Message-ID: <6cK72nd6uq2D_R-oBmQ5B3nEzr2V25F3tyXYta1BDEI=.75499f03-9a3e-4b0b-9126-d4ec4cfe87e8@github.com>
A trivial ADLC build fix. The ADLC_LANGSTD_CXXFLAGS should get passed.
-------------
Commit messages:
- 8325213: Flags introduced by configure script are not passed to ADLC build
Changes: https://git.openjdk.org/jdk/pull/17705/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17705&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8325213
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/17705.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17705/head:pull/17705
PR: https://git.openjdk.org/jdk/pull/17705
From jwaters at openjdk.org Mon Feb 5 08:36:00 2024
From: jwaters at openjdk.org (Julian Waters)
Date: Mon, 5 Feb 2024 08:36:00 GMT
Subject: RFR: 8325213: Flags introduced by configure script are not passed
to ADLC build
In-Reply-To: <6cK72nd6uq2D_R-oBmQ5B3nEzr2V25F3tyXYta1BDEI=.75499f03-9a3e-4b0b-9126-d4ec4cfe87e8@github.com>
References: <6cK72nd6uq2D_R-oBmQ5B3nEzr2V25F3tyXYta1BDEI=.75499f03-9a3e-4b0b-9126-d4ec4cfe87e8@github.com>
Message-ID:
On Mon, 5 Feb 2024 08:26:55 GMT, Martin Doerr wrote:
> A trivial ADLC build fix. The ADLC_LANGSTD_CXXFLAGS should get passed.
Marked as reviewed by jwaters (Committer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/17705#pullrequestreview-1862133568
From ihse at openjdk.org Mon Feb 5 09:19:03 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Mon, 5 Feb 2024 09:19:03 GMT
Subject: RFR: 8325213: Flags introduced by configure script are not passed
to ADLC build
In-Reply-To: <6cK72nd6uq2D_R-oBmQ5B3nEzr2V25F3tyXYta1BDEI=.75499f03-9a3e-4b0b-9126-d4ec4cfe87e8@github.com>
References: <6cK72nd6uq2D_R-oBmQ5B3nEzr2V25F3tyXYta1BDEI=.75499f03-9a3e-4b0b-9126-d4ec4cfe87e8@github.com>
Message-ID:
On Mon, 5 Feb 2024 08:26:55 GMT, Martin Doerr wrote:
> A trivial ADLC build fix. The ADLC_LANGSTD_CXXFLAGS should get passed.
LGTM. Thanks!
-------------
Marked as reviewed by ihse (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/17705#pullrequestreview-1862219166
From ihse at openjdk.org Mon Feb 5 09:19:07 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Mon, 5 Feb 2024 09:19:07 GMT
Subject: RFR: 8324539: Do not use LFS64 symbols in JDK libs [v7]
In-Reply-To:
References:
Message-ID:
On Fri, 2 Feb 2024 06:55:19 GMT, Magnus Ihse Bursie wrote:
>> Similar to [JDK-8318696](https://bugs.openjdk.org/browse/JDK-8318696), we should use -D_FILE_OFFSET_BITS=64, and not -D_LARGEFILE64_SOURCE in the JDK native libraries.
>
> Magnus Ihse Bursie has updated the pull request incrementally with one additional commit since the last revision:
>
> Add kludge to BufferedRenderPipe.c for AIX
zlib is 3rd party source, I did not touch those.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17538#issuecomment-1926532998
From aph at openjdk.org Mon Feb 5 09:20:04 2024
From: aph at openjdk.org (Andrew Haley)
Date: Mon, 5 Feb 2024 09:20:04 GMT
Subject: RFR: 8314488: Compile the JDK as C++17 [v6]
In-Reply-To:
References:
Message-ID:
On Wed, 17 Jan 2024 11:19:03 GMT, Magnus Ihse Bursie wrote:
> We have been stuck on a very old gcc for a long time, due to various reasons. Partly because old gcc versions were not as terrible as old versions of cl.exe, and partly to support odd linux platforms where newer gcc versions were not available.
>
> It is tempting to raise the bar to get better functionality available on all platforms. In the end, it is a balance between supporting older platforms, and getting a better common language level for the code.
>
> gcc 10 was released 3+ years ago. I guess that is good enough to consider it a reasonable new minimum.
I guess so, but that sounds rather aggressive to me. Sure, you can always install a newer GCC than the system one, but it's another thing that makes it harder for people to build OpenJDK. Having said that, C++17 is nice to have.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14988#issuecomment-1926533675
From ihse at openjdk.org Mon Feb 5 09:31:01 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Mon, 5 Feb 2024 09:31:01 GMT
Subject: RFR: 8325163: Enable -Wpedantic on clang
In-Reply-To: <5YoWExp50qGIjilv-9yq38jGsb3Fw7MJCQ8Sfc3Wp3c=.189956da-6f76-4723-9d4a-11d20b43eeb4@github.com>
References:
<5YoWExp50qGIjilv-9yq38jGsb3Fw7MJCQ8Sfc3Wp3c=.189956da-6f76-4723-9d4a-11d20b43eeb4@github.com>
Message-ID:
On Mon, 5 Feb 2024 03:21:35 GMT, Kim Barrett wrote:
>> Inspired by (the later backed-out) [JDK-8296115](https://bugs.openjdk.org/browse/JDK-8296115), I propose to enable `-Wpedantic` for clang. This has already found some irregularities in the code, like mistakenly using `#import` instead of `#include`. In this patch, I disable warnings for these individual buggy or badly written files, but I intend to post follow-up issues on the respective teams to have them properly fixed.
>>
>> Unfortunately, it is not possible to enable `-Wpedantic` on gcc, since individual warnings in `-Wpedantic` cannot be disabled. This means that code like this:
>>
>>
>> #define DEBUG_ONLY(code) code;
>>
>> DEBUG_ONLY(foo());
>>
>>
>> will result in a `; ;`. This breaks the C standard, but is benign, and we use it all over the place. On clang, we can ignore this by `-Wno-extra-semi`, but this is not available on gcc.
>
>> Inspired by (the later backed-out) [JDK-8296115](https://bugs.openjdk.org/browse/JDK-8296115), I propose to enable `-Wpedantic` for clang. This has already found some irregularities in the code, like mistakenly using `#import` instead of `#include`. In this patch, I disable warnings for these individual buggy or badly written files, but I intend to post follow-up issues on the respective teams to have them properly fixed.
>
> Rather than first turning on pedantic warnings and then (maybe) going back and perhaps fixing things, I'd really prefer
> things be done in the other order. (That's how I handled the recent `-Wparentheses` changes, for example.)
@kimbarrett
> Rather than first turning on pedantic warnings and then (maybe) going back and perhaps fixing things, I'd really prefer
things be done in the other order.
I hear what you are saying, but I respectfully disagree. If we do things in the order you suggest, the global flag cannot be turned on until all component teams have fixed their source code. That essentially makes the most overworked group putting an effective veto to this change (when your workload is too high, fixing warnings is not on top of your priority.) In contrast, if the global warning can be turned on now, it will have a positive effect on all new and modified code from now on. And the teams can work on their individual warnings, and remove them in their own time.
This is the same method I used for turning on -Wall and -Wextra. Some teams are very eager to fix warnings, and others still have almost all their "DISABLED_WARNINGS" left several years later. (I will not mention any names; you both know who you are ;-)). If I had followed the route you suggest, we would not have -Wall -Wextra on all source code (sans a few, marked files) now.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17687#issuecomment-1926553386
From ihse at openjdk.org Mon Feb 5 09:35:03 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Mon, 5 Feb 2024 09:35:03 GMT
Subject: RFR: 8325163: Enable -Wpedantic on clang
In-Reply-To:
References:
Message-ID:
On Mon, 5 Feb 2024 03:07:43 GMT, Kim Barrett wrote:
> at least not for a future version applying to gcc builds.
@kimbarrett @TheShermanTanker Please do not drag gcc into this PR. This is just about clang. Unless gcc makes a serious effort to shape up their inferior warning handling, I don't think we will ever be able to do something similar for gcc.
But that is not a reason to avoid doing it on clang. In general, we have tried to utilize the strength of every compiler, regardless of if all the other compilers could detect the same problem or not.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17687#issuecomment-1926559951
From ihse at openjdk.org Mon Feb 5 09:40:02 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Mon, 5 Feb 2024 09:40:02 GMT
Subject: RFR: 8325163: Enable -Wpedantic on clang
In-Reply-To:
References:
Message-ID: <2eBjcv6yofxCGu0-QfWUdsMPBXcy-XEcm_d2ajzXbjg=.c4f93413-339f-4a39-aab9-cb8a4b4a7528@github.com>
On Fri, 2 Feb 2024 15:22:03 GMT, Magnus Ihse Bursie wrote:
> Inspired by (the later backed-out) [JDK-8296115](https://bugs.openjdk.org/browse/JDK-8296115), I propose to enable `-Wpedantic` for clang. This has already found some irregularities in the code, like mistakenly using `#import` instead of `#include`. In this patch, I disable warnings for these individual buggy or badly written files, but I intend to post follow-up issues on the respective teams to have them properly fixed.
>
> Unfortunately, it is not possible to enable `-Wpedantic` on gcc, since individual warnings in `-Wpedantic` cannot be disabled. This means that code like this:
>
>
> #define DEBUG_ONLY(code) code;
>
> DEBUG_ONLY(foo());
>
>
> will result in a `; ;`. This breaks the C standard, but is benign, and we use it all over the place. On clang, we can ignore this by `-Wno-extra-semi`, but this is not available on gcc.
Also, a general note about the parts of `pedantic` that is globally disabled in this PR (like `extra-semi` and `format-pedantic`). It might very well be that the offending code is restricted to a few places (if these places are in commonly included header files, I was forced to disable the warning globally), and that it can be rather easily fixed.
All the better! But there is still no reason to do that *before* checking in this PR. Let's just get the minimum bar raised first. Then we can adress the issue of fixing the code to get rid of the exceptions for `extra-semi` and `format-pedantic`, if it is possible and if we want it. The latter is not at all clear; the rest of the list of globally disabled warnings (like `unused-parameter`) are warnings that we have agreed is useless, and only unfortunately dragged in with a catch-all flag like `-Wall` or `-Wextra`. From my PoV, the same could be said about `extra-semi`.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17687#issuecomment-1926569091
From ihse at openjdk.org Mon Feb 5 09:47:05 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Mon, 5 Feb 2024 09:47:05 GMT
Subject: RFR: 8314488: Compile the JDK as C++17 [v6]
In-Reply-To:
References:
Message-ID:
On Mon, 5 Feb 2024 09:17:11 GMT, Andrew Haley wrote:
> Sure, you can always install a newer GCC than the system one, but it's another thing that makes it harder for people to build OpenJDK. Having said that, C++17 is nice to have.
@theRealAph I am still just hearing hand-waving "perhaps someone somewhere will have a somewhat harder time building the JDK". Yes, perhaps that is so. But that is very uncertain, and I have still not heard a single concrete example of where this would apply. In contrast, going to gcc 10 will clearly bring a benefit to all other platforms, since it allows us to synchronize the code base at C++17.
In light of this, I think we need to hear some really compelling evidence of problems that would ensue if we raise the minimum to gcc 10. If nobody can produce such evidence, then to me it is a sign that this fear is not well-grounded, and we should proceed with this PR.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14988#issuecomment-1926580836
From ihse at openjdk.org Mon Feb 5 10:15:01 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Mon, 5 Feb 2024 10:15:01 GMT
Subject: RFR: 8325176: Compiling native tests with clang on linux fails
In-Reply-To:
References:
Message-ID:
On Fri, 2 Feb 2024 15:27:39 GMT, Magnus Ihse Bursie wrote:
> While we do not have automatic testing of using clang instead of gcc on linux, we try to keep it in working condition. This is still the case for the JDK itself, but there is a native test which fails to compile with clang. This should be fixed.
Any takers on this?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17688#issuecomment-1926634243
From jwaters at openjdk.org Mon Feb 5 10:20:04 2024
From: jwaters at openjdk.org (Julian Waters)
Date: Mon, 5 Feb 2024 10:20:04 GMT
Subject: RFR: 8325163: Enable -Wpedantic on clang
In-Reply-To:
References:
Message-ID:
On Mon, 5 Feb 2024 09:32:09 GMT, Magnus Ihse Bursie wrote:
> > at least not for a future version applying to gcc builds.
>
> @kimbarrett @TheShermanTanker Please do not drag gcc into this PR. This is just about clang. Unless gcc makes a serious effort to shape up their inferior warning handling, I don't think we will ever be able to do something similar for gcc.
>
> But that is not a reason to avoid doing it on clang. In general, we have tried to utilize the strength of every compiler, regardless of if all the other compilers could detect the same problem or not.
Hey, I never said anything about gcc compatibility being a blocker for this changeset :)
(I do have however a couple a questions which are listed above)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17687#issuecomment-1926642510
From jwaters at openjdk.org Mon Feb 5 10:26:00 2024
From: jwaters at openjdk.org (Julian Waters)
Date: Mon, 5 Feb 2024 10:26:00 GMT
Subject: RFR: 8325176: Compiling native tests with clang on linux fails
In-Reply-To:
References:
Message-ID:
On Fri, 2 Feb 2024 15:27:39 GMT, Magnus Ihse Bursie wrote:
> While we do not have automatic testing of using clang instead of gcc on linux, we try to keep it in working condition. This is still the case for the JDK itself, but there is a native test which fails to compile with clang. This should be fixed.
Marked as reviewed by jwaters (Committer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/17688#pullrequestreview-1862361991
From jwaters at openjdk.org Mon Feb 5 10:26:01 2024
From: jwaters at openjdk.org (Julian Waters)
Date: Mon, 5 Feb 2024 10:26:01 GMT
Subject: RFR: 8325176: Compiling native tests with clang on linux fails
In-Reply-To:
References:
Message-ID:
On Mon, 5 Feb 2024 10:12:30 GMT, Magnus Ihse Bursie wrote:
> Any takers on this?
Have an obligatory +1 for the build changes I suppose, but isn't there the ability to use DISABLED_WARNINGS or a #pragma clang for this?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17688#issuecomment-1926654201
From ihse at openjdk.org Mon Feb 5 10:38:26 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Mon, 5 Feb 2024 10:38:26 GMT
Subject: RFR: 8321373: Build should use LC_ALL=C.UTF-8 [v3]
In-Reply-To: <9CbEPFCW69TrCZHAEYtPrOLDJdDyPN3NN6jjKzPhEv4=.e70c5204-28a4-4f42-814f-927dad42b8d4@github.com>
References: <9CbEPFCW69TrCZHAEYtPrOLDJdDyPN3NN6jjKzPhEv4=.e70c5204-28a4-4f42-814f-927dad42b8d4@github.com>
Message-ID: <9STA_Xf9xn0LpZJ-KF2KAVxKYIm4NnP0jIdKeBaBfRE=.2555eb46-e8a7-4f56-8815-ffe98d652470@github.com>
> We're currently setting LC_ALL=C. Not all tools will default to utf-8 as their encoding of choice when they see this locale, but use an arbitrarily encoding, which might not properly handle all UTF-8 characters. Since in practice, all our encoding is utf8, we should tell our tools this as well.
>
> This will at least have effect on how Java treats path names including unicode characters.
Magnus Ihse Bursie has updated the pull request incrementally with two additional commits since the last revision:
- Update copyright year
- check for utf-8 first
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/16971/files
- new: https://git.openjdk.org/jdk/pull/16971/files/d5f5a257..c09bc9b1
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=16971&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=16971&range=01-02
Stats: 23 lines in 4 files changed: 17 ins; 0 del; 6 mod
Patch: https://git.openjdk.org/jdk/pull/16971.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/16971/head:pull/16971
PR: https://git.openjdk.org/jdk/pull/16971
From ihse at openjdk.org Mon Feb 5 10:41:02 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Mon, 5 Feb 2024 10:41:02 GMT
Subject: RFR: 8325176: Compiling native tests with clang on linux fails
In-Reply-To:
References:
Message-ID:
On Fri, 2 Feb 2024 15:27:39 GMT, Magnus Ihse Bursie wrote:
> While we do not have automatic testing of using clang instead of gcc on linux, we try to keep it in working condition. This is still the case for the JDK itself, but there is a native test which fails to compile with clang. This should be fixed.
The test native libraries are special, so I did not think DISABLED_WARNINGS would work very well. But maybe it does. (Even I am getting lost in the rules for combining arguments to SetupNativeCompilation, even if I wrote most of them :-))
I'll have a look. It is definitely cleaner if it works. (Even though the best would probably be to fix the test.)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17688#issuecomment-1926681840
From ihse at openjdk.org Mon Feb 5 10:48:01 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Mon, 5 Feb 2024 10:48:01 GMT
Subject: RFR: 8325163: Enable -Wpedantic on clang
In-Reply-To:
References:
Message-ID:
On Fri, 2 Feb 2024 15:22:03 GMT, Magnus Ihse Bursie wrote:
> Inspired by (the later backed-out) [JDK-8296115](https://bugs.openjdk.org/browse/JDK-8296115), I propose to enable `-Wpedantic` for clang. This has already found some irregularities in the code, like mistakenly using `#import` instead of `#include`. In this patch, I disable warnings for these individual buggy or badly written files, but I intend to post follow-up issues on the respective teams to have them properly fixed.
>
> Unfortunately, it is not possible to enable `-Wpedantic` on gcc, since individual warnings in `-Wpedantic` cannot be disabled. This means that code like this:
>
>
> #define DEBUG_ONLY(code) code;
>
> DEBUG_ONLY(foo());
>
>
> will result in a `; ;`. This breaks the C standard, but is benign, and we use it all over the place. On clang, we can ignore this by `-Wno-extra-semi`, but this is not available on gcc.
I am sorry, but all I can see is:
> Just a few questions...
and then your comment ends. And I can't find any other comment with a list of questions.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17687#issuecomment-1926693945
From ihse at openjdk.org Mon Feb 5 10:58:17 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Mon, 5 Feb 2024 10:58:17 GMT
Subject: RFR: 8325163: Enable -Wpedantic on clang [v2]
In-Reply-To:
References:
Message-ID:
> Inspired by (the later backed-out) [JDK-8296115](https://bugs.openjdk.org/browse/JDK-8296115), I propose to enable `-Wpedantic` for clang. This has already found some irregularities in the code, like mistakenly using `#import` instead of `#include`. In this patch, I disable warnings for these individual buggy or badly written files, but I intend to post follow-up issues on the respective teams to have them properly fixed.
>
> Unfortunately, it is not possible to enable `-Wpedantic` on gcc, since individual warnings in `-Wpedantic` cannot be disabled. This means that code like this:
>
>
> #define DEBUG_ONLY(code) code;
>
> DEBUG_ONLY(foo());
>
>
> will result in a `; ;`. This breaks the C standard, but is benign, and we use it all over the place. On clang, we can ignore this by `-Wno-extra-semi`, but this is not available on gcc.
Magnus Ihse Bursie has updated the pull request incrementally with one additional commit since the last revision:
FIx dtrace build
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/17687/files
- new: https://git.openjdk.org/jdk/pull/17687/files/4de3c446..ffa70af6
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=17687&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=17687&range=00-01
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/17687.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17687/head:pull/17687
PR: https://git.openjdk.org/jdk/pull/17687
From jwaters at openjdk.org Mon Feb 5 10:58:17 2024
From: jwaters at openjdk.org (Julian Waters)
Date: Mon, 5 Feb 2024 10:58:17 GMT
Subject: RFR: 8325163: Enable -Wpedantic on clang
In-Reply-To:
References:
Message-ID:
On Mon, 5 Feb 2024 10:44:59 GMT, Magnus Ihse Bursie wrote:
> I am sorry, but all I can see is:
>
> > Just a few questions...
>
> and then your comment ends. And I can't find any other comment with a list of questions.
Eh? Aren't they in the code review section? But in any case:
> Shouldn't this be -pedantic -Wpedantic, and wouldn't this be better positioned at where HotSpot currently sets -permissive- for Microsoft Visual C++ (In other words, TOOLCHAIN_CFLAGS_JVM and TOOLCHAIN_CFLAGS_JDK)? The 2 options are not the same, at least on gcc, and I'm unsure if the same is true for clang
The other concern I had was that there are a ton of disabled warnings added by this change, but I guess that's already been answered by that other reply
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17687#issuecomment-1926701211
From ihse at openjdk.org Mon Feb 5 11:06:01 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Mon, 5 Feb 2024 11:06:01 GMT
Subject: RFR: 8325176: Compiling native tests with clang on linux fails
In-Reply-To:
References:
Message-ID: <8vXlMbtDQuSxKQEOu0XNBphj9jyw1KTIO3XyLKdiquo=.d4836639-0c6d-48f1-a873-9203d061a1ba@github.com>
On Mon, 5 Feb 2024 10:37:59 GMT, Magnus Ihse Bursie wrote:
> I'll have a look. It is definitely cleaner if it works.
Yeah, no, as expected it did not work.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17688#issuecomment-1926726543
From mbaesken at openjdk.org Mon Feb 5 12:10:08 2024
From: mbaesken at openjdk.org (Matthias Baesken)
Date: Mon, 5 Feb 2024 12:10:08 GMT
Subject: RFR: 8324539: Do not use LFS64 symbols in JDK libs [v7]
In-Reply-To:
References:
Message-ID:
On Fri, 2 Feb 2024 06:55:19 GMT, Magnus Ihse Bursie wrote:
>> Similar to [JDK-8318696](https://bugs.openjdk.org/browse/JDK-8318696), we should use -D_FILE_OFFSET_BITS=64, and not -D_LARGEFILE64_SOURCE in the JDK native libraries.
>
> Magnus Ihse Bursie has updated the pull request incrementally with one additional commit since the last revision:
>
> Add kludge to BufferedRenderPipe.c for AIX
Current commit compiles nicely on AIX.
One issue we might still have
statvfs/statvfs64 is not mentioned here in the table of functions/structs redefined on AIX
https://www.ibm.com/docs/en/aix/7.1?topic=volumes-writing-programs-that-access-large-files
so would we fall back to statvfs from the *64 - variant ?
The define _LARGE_FILES might not help in this case on AIX .
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17538#issuecomment-1926848063
From ihse at openjdk.org Mon Feb 5 12:18:04 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Mon, 5 Feb 2024 12:18:04 GMT
Subject: RFR: 8325163: Enable -Wpedantic on clang
In-Reply-To:
References:
Message-ID:
On Mon, 5 Feb 2024 10:49:07 GMT, Julian Waters wrote:
> Shouldn't this be -pedantic -Wpedantic, and wouldn't this be better positioned at where HotSpot currently sets -permissive- for Microsoft Visual C++ (In other words, TOOLCHAIN_CFLAGS_JVM and TOOLCHAIN_CFLAGS_JDK)? The 2 options are not the same, at least on gcc, and I'm unsure if the same is true for clang
(It is really weird, I cannot find that original comment anywhere in the Github PR :-()
As far as I have been able to determine, -Wpedantic and -pedantic are aliases on gcc > 5, and the same is true for clang. -Wpedantic seems to be the preferred way nowadays.
`TOOLCHAIN_CFLAGS_JVM` is arguably if not wrong so at least not the best place to put `-permissive-`. `-Wpermissive` belongs with `-Wall -Wextra`.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17687#issuecomment-1926861360
From jkern at openjdk.org Mon Feb 5 12:20:07 2024
From: jkern at openjdk.org (Joachim Kern)
Date: Mon, 5 Feb 2024 12:20:07 GMT
Subject: RFR: 8324539: Do not use LFS64 symbols in JDK libs [v7]
In-Reply-To:
References:
Message-ID:
On Mon, 5 Feb 2024 12:07:45 GMT, Matthias Baesken wrote:
> Current commit compiles nicely on AIX. One issue we might still have statvfs/statvfs64 is not mentioned here in the table of functions/structs redefined on AIX https://www.ibm.com/docs/en/aix/7.1?topic=volumes-writing-programs-that-access-large-files so would we fall back to statvfs from the *64 - variant ? The define _LARGE_FILES might not help in this case on AIX .
Yes, if statvfs64() is replaced by statvfs() in the code, we will fallback on AIX to 32-Bit. _LARGE_FILES really does not help in this case!
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17538#issuecomment-1926865295
From ihse at openjdk.org Mon Feb 5 12:21:01 2024
From: ihse at openjdk.org (Magnus Ihse Bursie)
Date: Mon, 5 Feb 2024 12:21:01 GMT
Subject: RFR: 8325163: Enable -Wpedantic on clang
In-Reply-To:
References:
Message-ID:
On Mon, 5 Feb 2024 10:49:07 GMT, Julian Waters