RFR: JDK-8298448: UndefinedBehaviorSanitizer

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

Re: RFR: 8298380: Clean up redundant array length checks in JDK code base

2022-12-08 Thread Vyom Tewari
On Thu, 8 Dec 2022 12:37:17 GMT, Sergey Tsypanov wrote: > Newer version of IntelliJ IDEA introduces new > [inspection](https://youtrack.jetbrains.com/issue/IDEA-301797/IDEA-should-report-redundant-array-length-check-in-certain-cases) > detecting redundant array length check in snippets like >

Re: RFR: 8298380: Clean up redundant array length checks in JDK code base

2022-12-08 Thread Sergey Bylokhov
On Thu, 8 Dec 2022 12:37:17 GMT, Sergey Tsypanov wrote: > Newer version of IntelliJ IDEA introduces new > [inspection](https://youtrack.jetbrains.com/issue/IDEA-301797/IDEA-should-report-redundant-array-length-check-in-certain-cases) > detecting redundant array length check in snippets like >

Integrated: JDK-8297679: InvocationTargetException field named target is not declared final

2022-12-08 Thread Joe Darcy
On Thu, 8 Dec 2022 18:10:12 GMT, Joe Darcy wrote: > Should be an innocuous change of a private field to final; I'll run an > internal round of sanity tests before any push to make sure there isn't any > unexpected interaction. This pull request has now been integrated. Changeset: 7f9c6ce3 Aut

Re: RFR: 8298380: Clean up redundant array length checks in JDK code base

2022-12-08 Thread Alex Menkov
On Thu, 8 Dec 2022 12:37:17 GMT, Sergey Tsypanov wrote: > Newer version of IntelliJ IDEA introduces new > [inspection](https://youtrack.jetbrains.com/issue/IDEA-301797/IDEA-should-report-redundant-array-length-check-in-certain-cases) > detecting redundant array length check in snippets like >

Re: RFR: 8298380: Clean up redundant array length checks in JDK code base

2022-12-08 Thread David Holmes
On Thu, 8 Dec 2022 12:37:17 GMT, Sergey Tsypanov wrote: > Newer version of IntelliJ IDEA introduces new > [inspection](https://youtrack.jetbrains.com/issue/IDEA-301797/IDEA-should-report-redundant-array-length-check-in-certain-cases) > detecting redundant array length check in snippets like >

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

2022-12-08 Thread Stuart Marks
On Wed, 7 Dec 2022 17:38:31 GMT, Brent Christian wrote: >> [JDK-8290036](https://bugs.openjdk.org/browse/JDK-8290036) documented the >> shutdown sequence, noting that calling Runtime.halt() skips the shutdown >> sequence and immediately terminates the VM. Thus, "threads' current methods >> do

Re: RFR: 8295803: Console should be usable in jshell and other environments [v7]

2022-12-08 Thread Naoto Sato
On Tue, 6 Dec 2022 18:10:38 GMT, Naoto Sato wrote: >> src/java.base/share/classes/java/io/Console.java line 99: >> >>> 97: */ >>> 98: >>> 99: public class Console implements Flushable >> >> Should we perhaps `seal` this class and only `permit` `ProxyingConsole` to >> `extend` it? > > Right.

Re: RFR: 8297632: InputStream.transferTo() method should specify what the return value should be when the number of bytes transfered is larger than Long.MAX_VALUE [v5]

2022-12-08 Thread Brian Burkhalter
> `java.io.InputStream::transferTo` could conceivably return a negative value > if the count of bytes transferred overflows a `long`. Modify the method to > limit the number of bytes transferred to `Long.MAX_VALUE` per invocation. Brian Burkhalter has updated the pull request with a new target b

Re: RFR: JDK-8297679: InvocationTargetException field named target is not declared final

2022-12-08 Thread Alan Bateman
On Thu, 8 Dec 2022 18:10:12 GMT, Joe Darcy wrote: > Should be an innocuous change of a private field to final; I'll run an > internal round of sanity tests before any push to make sure there isn't any > unexpected interaction. Marked as reviewed by alanb (Reviewer). - PR: https:/

RFR: JDK-8297679: InvocationTargetException field named target is not declared final

2022-12-08 Thread Joe Darcy
Should be an innocuous change of a private field to final; I'll run an internal round of sanity tests before any push to make sure there isn't any unexpected interaction. - Commit messages: - JDK-8297679: InvocationTargetException field named target is not declared fina Changes:

Integrated: 8297295: Remove ThreadGroup.allowThreadSuspension

2022-12-08 Thread Alan Bateman
On Fri, 25 Nov 2022 18:54:28 GMT, Alan Bateman wrote: > Another small step in the multi-release/multi-year effort to remove cruft > from Thread/ThreadGroup. > > java.lang.ThreadGroup.allowThreadSuspension(boolean) dates from JDK 1.1 and > the Classic VM. The method controlled whether threads w

Re: RFR: 8297295: Remove ThreadGroup.allowThreadSuspension [v3]

2022-12-08 Thread Joe Darcy
On Thu, 8 Dec 2022 17:15:46 GMT, Alan Bateman wrote: >> Another small step in the multi-release/multi-year effort to remove cruft >> from Thread/ThreadGroup. >> >> java.lang.ThreadGroup.allowThreadSuspension(boolean) dates from JDK 1.1 and >> the Classic VM. The method controlled whether threa

Re: Difference in behaviour in native math library

2022-12-08 Thread Joseph D. Darcy
Hello, Okay, so it looks like the test is expected the same bit pattern to be used for a NaN output if a NaN was used as an input. That isn't necessarily unreasonable, but it is *not* required by the specifications for the Math or StrictMath method, spec for Math.acos: Returns the arc cosin

Re: RFR: 8297295: Remove ThreadGroup.allowThreadSuspension [v3]

2022-12-08 Thread Alan Bateman
> Another small step in the multi-release/multi-year effort to remove cruft > from Thread/ThreadGroup. > > java.lang.ThreadGroup.allowThreadSuspension(boolean) dates from JDK 1.1 and > the Classic VM. The method controlled whether threads were suspended when the > GC failed. It appears to have

Integrated: JDK-8296149: Start of release updates for JDK 21

2022-12-08 Thread Joe Darcy
On Tue, 1 Nov 2022 05:49:25 GMT, Joe Darcy wrote: > Usual start-of-release updates. Symbol updates in initial version reflect JDK > 20 build 21. This pull request has now been integrated. Changeset: 175e3d3f Author:Joe Darcy Committer: Jesper Wilhelmsson URL: https://git.openjdk.o

Re: RFR: JDK-8298277: Replace "session" with "scope" for FFM access [v2]

2022-12-08 Thread Maurizio Cimadamore
On Thu, 8 Dec 2022 15:57:23 GMT, Per Minborg wrote: >> This PR proposes changing variable names and text from "session" to "scope". >> The proposed changes are only for the FFM API and not other parts like the >> Vector API and test classes. > > Per Minborg has updated the pull request incremen

Re: RFR: JDK-8298277: Replace "session" with "scope" for FFM access [v2]

2022-12-08 Thread Per Minborg
> This PR proposes changing variable names and text from "session" to "scope". > The proposed changes are only for the FFM API and not other parts like the > Vector API and test classes. Per Minborg has updated the pull request incrementally with one additional commit since the last revision:

Re: RFR: JDK-8298277: Replace "session" with "scope" for FFM access

2022-12-08 Thread Per Minborg
On Thu, 8 Dec 2022 14:36:52 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/jdk/internal/foreign/abi/Binding.java line 255: >> >>> 253: * the context's allocator is accessed. >>> 254: */ >>> 255: public static Context ofScope() { >> >> I think `ofArena`

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

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

Re: RFR: JDK-8298277: Replace "session" with "scope" for FFM access

2022-12-08 Thread Maurizio Cimadamore
On Thu, 8 Dec 2022 14:33:01 GMT, Maurizio Cimadamore wrote: >> This PR proposes changing variable names and text from "session" to "scope". >> The proposed changes are only for the FFM API and not other parts like the >> Vector API and test classes. > > src/java.base/share/classes/jdk/internal

Re: RFR: JDK-8298277: Replace "session" with "scope" for FFM access

2022-12-08 Thread Maurizio Cimadamore
On Thu, 8 Dec 2022 14:11:29 GMT, Per Minborg wrote: > This PR proposes changing variable names and text from "session" to "scope". > The proposed changes are only for the FFM API and not other parts like the > Vector API and test classes. src/java.base/share/classes/jdk/internal/foreign/Abstra

RFR: JDK-8298277: Replace "session" with "scope" for FFM access

2022-12-08 Thread Per Minborg
This PR proposes changing variable names and text from "session" to "scope". The proposed changes are only for the FFM API and not other parts like the Vector API and test classes. - Commit messages: - Rename session to scope Changes: https://git.openjdk.org/jdk/pull/11593/files

Re: RFR: 8298277: Replace "session" with "scope" for FFM access [v2]

2022-12-08 Thread Per Minborg
On Thu, 8 Dec 2022 08:17:44 GMT, Per Minborg wrote: >> This PR suggests renaming various names from "session" to "scope" in >> accordance with https://openjdk.org/jeps/434 >> >> The PRs contains changes for several sub-components. > > Per Minborg has updated the pull request incrementally with

Withdrawn: 8298277: Replace "session" with "scope" for FFM access

2022-12-08 Thread Per Minborg
On Wed, 7 Dec 2022 21:55:43 GMT, Per Minborg wrote: > This PR suggests renaming various names from "session" to "scope" in > accordance with https://openjdk.org/jeps/434 > > The PRs contains changes for several sub-components. This pull request has been closed without being integrated. --

RFR: 8298380: Clean up redundant array length checks in JDK code base

2022-12-08 Thread Sergey Tsypanov
Newer version of IntelliJ IDEA introduces new [inspection](https://youtrack.jetbrains.com/issue/IDEA-301797/IDEA-should-report-redundant-array-length-check-in-certain-cases) detecting redundant array length check in snippets like void iterate(T[] items) { if (items.length == 0) { return;

Integrated: 8298375: Bad copyright header in test/jdk/java/lang/Character/Supplementary.java

2022-12-08 Thread Jaikiran Pai
On Thu, 8 Dec 2022 10:48:40 GMT, Jaikiran Pai wrote: > Can I get a review of this change which fixes the copyright header on the > test file? This pull request has now been integrated. Changeset: 2f426cd6 Author:Jaikiran Pai URL: https://git.openjdk.org/jdk/commit/2f426cd68b28c8bf5

Re: RFR: 8298375: Bad copyright header in test/jdk/java/lang/Character/Supplementary.java

2022-12-08 Thread Jaikiran Pai
On Thu, 8 Dec 2022 10:48:40 GMT, Jaikiran Pai wrote: > Can I get a review of this change which fixes the copyright header on the > test file? Thank you Alan for the quick review. Local testing of this change shows that it works. I'll go ahead with the integration. - PR: https://g

Re: RFR: 8298375: Bad copyright header in test/jdk/java/lang/Character/Supplementary.java

2022-12-08 Thread Alan Bateman
On Thu, 8 Dec 2022 10:48:40 GMT, Jaikiran Pai wrote: > Can I get a review of this change which fixes the copyright header on the > test file? Marked as reviewed by alanb (Reviewer). - PR: https://git.openjdk.org/jdk/pull/11583

RFR: 8298375: Bad copyright header in test/jdk/java/lang/Character/Supplementary.java

2022-12-08 Thread Jaikiran Pai
Can I get a review of this change which fixes the copyright header on the test file? - Commit messages: - 8298375: Bad copyright header in test/jdk/java/lang/Character/Supplementary.java Changes: https://git.openjdk.org/jdk/pull/11583/files Webrev: https://webrevs.openjdk.org/?re

Re: RFR: 8298033: Character.codePoint{At|Before}(char[], int, int) doesn't do JavaDoc-specified check [v6]

2022-12-08 Thread Jaikiran Pai
On Tue, 6 Dec 2022 18:39:28 GMT, Sergey Tsypanov wrote: >> I found out that this code >> >> public class Main { >> public static void main(String[] args) { >> String s = "Hello world!"; >> char[] chars = s.toCharArray(); >> int point = Character.codePointAt(chars, -1,

Integrated: 8298033: Character.codePoint{At|Before}(char[], int, int) doesn't do JavaDoc-specified check

2022-12-08 Thread Sergey Tsypanov
On Fri, 2 Dec 2022 12:44:18 GMT, Sergey Tsypanov wrote: > I found out that this code > > public class Main { > public static void main(String[] args) { > String s = "Hello world!"; > char[] chars = s.toCharArray(); > int point = Character.codePointAt(chars, -1, 1); >

Re: RFR: 8298277: Replace "session" with "scope" for FFM access [v2]

2022-12-08 Thread Per Minborg
> This PR suggests renaming various names from "session" to "scope" in > accordance with https://openjdk.org/jeps/434 > > The PRs contains changes for several sub-components. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Revert ren