Re: RFR: JDK-8327444: simplify RESTARTABLE macro usage in JDK codebase [v3]

2024-03-06 Thread Guoxiong Li
On Thu, 7 Mar 2024 07:20:15 GMT, David Holmes wrote: > Oracle requests/requires that the Oracle copyright always be updated when a > file is modified. Got it. Thanks for your explanation. - PR Review Comment: https://git.openjdk.org/jdk/pull/18132#discussion_r1515672685

Re: RFR: JDK-8327444: simplify RESTARTABLE macro usage in JDK codebase [v3]

2024-03-06 Thread David Holmes
On Thu, 7 Mar 2024 03:00:11 GMT, Guoxiong Li wrote: >> Matthias Baesken has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Introduce windows jni_util_md.h > > src/java.base/aix/native/libnio/ch/Pollset.c line 3: > >> 1: /* >> 2: *

Re: RFR: 8327138: Clean up status management in cdsConfig.hpp and CDS.java [v3]

2024-03-06 Thread David Holmes
On Wed, 6 Mar 2024 23:36:09 GMT, Ioi Lam wrote: >> A few clean ups: >> >> 1. Rename functions like "`s_loading_full_module_graph()` to >> `is_using_full_module_graph()`. The meaning of "loading" is not clear: it >> might be interpreted as to cover only the period where the artifact is being

Re: RFR: 8292955: Collections.checkedMap Map.merge does not properly check key and value [v3]

2024-03-06 Thread Guoxiong Li
On Thu, 7 Mar 2024 05:33:16 GMT, Korov wrote: >> When the specified key did not associated with a value, should check the >> `key` and `value` type. > > Korov has updated the pull request incrementally with one additional commit > since the last revision: > > Use testNG builtin

Re: RFR: 8292955: Collections.checkedMap Map.merge does not properly check key and value [v2]

2024-03-06 Thread Korov
On Thu, 7 Mar 2024 04:37:24 GMT, Chen Liang wrote: >> Korov has updated the pull request incrementally with one additional commit >> since the last revision: >> >> modify the code based on the review > > test/jdk/java/util/Collections/CheckedMapBash.java line 193: > >> 191:

Re: RFR: 8292955: Collections.checkedMap Map.merge does not properly check key and value [v3]

2024-03-06 Thread Korov
> When the specified key did not associated with a value, should check the > `key` and `value` type. Korov has updated the pull request incrementally with one additional commit since the last revision: Use testNG builtin functionalities and modify the test function name -

Re: RFR: 8292955: Collections.checkedMap Map.merge does not properly check key and value [v2]

2024-03-06 Thread Chen Liang
On Thu, 7 Mar 2024 04:13:17 GMT, Korov wrote: >> When the specified key did not associated with a value, should check the >> `key` and `value` type. > > Korov has updated the pull request incrementally with one additional commit > since the last revision: > > modify the code based on the

Re: RFR: 8292955: Collections.checkedMap Map.merge does not properly check key and value [v2]

2024-03-06 Thread Korov
On Thu, 7 Mar 2024 03:44:55 GMT, Guoxiong Li wrote: > Good caught. A trivial suggestion. Thanks for your suggestion, the code has been modified. - PR Comment: https://git.openjdk.org/jdk/pull/18141#issuecomment-1982318659

Re: RFR: 8292955: Collections.checkedMap Map.merge does not properly check key and value [v2]

2024-03-06 Thread Korov
> When the specified key did not associated with a value, should check the > `key` and `value` type. Korov has updated the pull request incrementally with one additional commit since the last revision: modify the code based on the review - Changes: - all:

Re: RFR: 8292955: Collections.checkedMap Map.merge does not properly check key and value

2024-03-06 Thread Guoxiong Li
On Wed, 6 Mar 2024 18:26:16 GMT, Korov wrote: > When the specified key did not associated with a value, should check the > `key` and `value` type. Good caught. A trivial suggestion. test/jdk/java/util/Collections/CheckedMapBash.java line 192: > 190: Map m =

Re: RFR: 8325567: jspawnhelper without args fails with segfault

2024-03-06 Thread Vladimir Petko
On Wed, 6 Mar 2024 09:26:08 GMT, Aleksey Shipilev wrote: > ``` > Process p = ProcessTools.startProcess(...); > OutputAnalyzer oa = new OutputAnalyzer(p); > oa.shouldNotHaveExitValue(0); > oa.shouldContain("This command is not for general use"); > ``` Thank you! This shortens things quite

Re: RFR: JDK-8327444: simplify RESTARTABLE macro usage in JDK codebase [v3]

2024-03-06 Thread Guoxiong Li
On Wed, 6 Mar 2024 16:30:23 GMT, Matthias Baesken wrote: >> We define the RESTARTABLE macro again and again at a lot of places in the >> JDK native codebase. This could be centralized to avoid repeating it again >> and again ! > > Matthias Baesken has updated the pull request incrementally

Integrated: 8327434: Test java/util/PluggableLocale/TimeZoneNameProviderTest.java timed out

2024-03-06 Thread Naoto Sato
On Wed, 6 Mar 2024 21:32:11 GMT, Naoto Sato wrote: > Fixing timeout failures in the test case. Time zone names that are missing > (chiefly for minor locales) are now calculated at runtime after the fix to > JDK-8174269. This extra calculation time was multiplied in the test case as > it

Re: RFR: 8327434: Test java/util/PluggableLocale/TimeZoneNameProviderTest.java timed out

2024-03-06 Thread Iris Clark
On Wed, 6 Mar 2024 21:32:11 GMT, Naoto Sato wrote: > Fixing timeout failures in the test case. Time zone names that are missing > (chiefly for minor locales) are now calculated at runtime after the fix to > JDK-8174269. This extra calculation time was multiplied in the test case as > it

Re: RFR: 8327501: Common ForkJoinPool prevents class unloading in some cases

2024-03-06 Thread Doug Lea
On Wed, 6 Mar 2024 22:58:54 GMT, Viktor Klang wrote: > The common ForkJoinPool creating threads as a result of submitting tasks is > preventing class unloading when the thread construction is initiated from a > class loaded in a separate classloader. This fix avoids that when no >

Re: RFR: 8327138: Clean up status management in cdsConfig.hpp and CDS.java [v3]

2024-03-06 Thread Ioi Lam
> A few clean ups: > > 1. Rename functions like "`s_loading_full_module_graph()` to > `is_using_full_module_graph()`. The meaning of "loading" is not clear: it > might be interpreted as to cover only the period where the artifact is being > loaded, but not the period after the artifact is

Re: Class loader leaked when ForkJoinPool is used in loaded class, with Java 19+

2024-03-06 Thread Viktor Klang
Hi Simeon, Thanks for your email. After discussing this with Doug Lea and Alan Bateman I've opened the following PR: https://github.com/openjdk/jdk/pull/18144

Re: RFR: 8327501: Common ForkJoinPool prevents class unloading in some cases

2024-03-06 Thread Viktor Klang
On Wed, 6 Mar 2024 22:58:54 GMT, Viktor Klang wrote: > The common ForkJoinPool creating threads as a result of submitting tasks is > preventing class unloading when the thread construction is initiated from a > class loaded in a separate classloader. This fix avoids that when no >

Re: RFR: JDK-8327444: simplify RESTARTABLE macro usage in JDK codebase [v3]

2024-03-06 Thread Brian Burkhalter
On Wed, 6 Mar 2024 16:30:23 GMT, Matthias Baesken wrote: >> We define the RESTARTABLE macro again and again at a lot of places in the >> JDK native codebase. This could be centralized to avoid repeating it again >> and again ! > > Matthias Baesken has updated the pull request incrementally

Re: RFR: 8327434: Test java/util/PluggableLocale/TimeZoneNameProviderTest.java timed out

2024-03-06 Thread Roger Riggs
On Wed, 6 Mar 2024 21:32:11 GMT, Naoto Sato wrote: > Fixing timeout failures in the test case. Time zone names that are missing > (chiefly for minor locales) are now calculated at runtime after the fix to > JDK-8174269. This extra calculation time was multiplied in the test case as > it

Re: RFR: 8327434: Test java/util/PluggableLocale/TimeZoneNameProviderTest.java timed out

2024-03-06 Thread Justin Lu
On Wed, 6 Mar 2024 21:32:11 GMT, Naoto Sato wrote: > Fixing timeout failures in the test case. Time zone names that are missing > (chiefly for minor locales) are now calculated at runtime after the fix to > JDK-8174269. This extra calculation time was multiplied in the test case as > it

RFR: 8327501: Common ForkJoinPool prevents class unloading in some cases

2024-03-06 Thread Viktor Klang
creating threads in the common ForkJoinPool preventing class unloading. This fix avoids that when no SecurityManager is configured. - Commit messages: - Addresses a capture of AccessControlContext when Changes: https://git.openjdk.org/jdk/pull/18144/files Webrev:

Re: RFR: 8327138: Clean up status management in cdsConfig.hpp and CDS.java [v2]

2024-03-06 Thread Ioi Lam
On Wed, 6 Mar 2024 18:42:01 GMT, Matias Saavedra Silva wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fixed alignments > > src/hotspot/share/cds/cdsConfig.hpp line 72: > >> 70: static void

Re: RFR: 8327138: Clean up status management in cdsConfig.hpp and CDS.java [v2]

2024-03-06 Thread Ioi Lam
> A few clean ups: > > 1. Rename functions like "`s_loading_full_module_graph()` to > `is_using_full_module_graph()`. The meaning of "loading" is not clear: it > might be interpreted as to cover only the period where the artifact is being > loaded, but not the period after the artifact is

Re: RFR: 8314250: CDS dump error message: Invoker type parameter must start and end with Object: L3I_L

2024-03-06 Thread Ioi Lam
On Wed, 21 Feb 2024 19:10:16 GMT, Calvin Cheung wrote: > To avoid the CDS dump error message, a fix is during dumping a classlist, > check if an invoker can be archived. > If not, don't write the invoker info into the classlist, i.e. don't call > `logLambdaFormInvoker()`. While generating

RFR: 8327434: Test java/util/PluggableLocale/TimeZoneNameProviderTest.java timed out

2024-03-06 Thread Naoto Sato
Fixing timeout failures in the test case. Time zone names that are missing (chiefly for minor locales) are now calculated at runtime after the fix to JDK-8174269. This extra calculation time was multiplied in the test case as it iterated over all locales x timezones, which caused timeouts in

Re: RFR: 8327218: Add an ability to specify modules which should have native access enabled [v2]

2024-03-06 Thread Jan Lahoda
On Tue, 5 Mar 2024 18:54:55 GMT, Alan Bateman wrote: >> Jan Lahoda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Apply suggestions from code review >> >> Co-authored-by: ExE Boss <3889017+exe-b...@users.noreply.github.com> >>

Re: RFR: 8327218: Add an ability to specify modules which should have native access enabled [v3]

2024-03-06 Thread Jan Lahoda
> Currently, JDK modules load by the bootstrap and platform ClassLoaders are > automatically granted the native access. I am working on an upgrade of JLine > inside the `jdk.internal.le` module, and I would like to replace the current > native bindings with FFM-based bindings (which are now

Re: RFR: JDK-8327487: Further augment WorstCaseTests with more cases [v2]

2024-03-06 Thread Joe Darcy
> The atan2 and hypot cases added would fail for a particular test library that > has errors in the millions of ulps for those inputs, rather than the small > number of ulps specified for the error. Joe Darcy has updated the pull request incrementally with one additional commit since the last

Integrated: 8326718: Test java/util/Formatter/Padding.java should timeout on large inputs before fix in JDK-8299677

2024-03-06 Thread Chad Rakoczy
On Tue, 27 Feb 2024 17:24:03 GMT, Chad Rakoczy wrote: > [JDK-8299677](https://bugs.openjdk.java.net/browse/JDK-8299677) fixes a bug > with Formatter.format taking a long time when there is a lot of padding. This > test runs Formatter.format with very large padding. Test fails before >

Re: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v18]

2024-03-06 Thread Severin Gehwolf
On Wed, 6 Mar 2024 17:28:01 GMT, Magnus Ihse Bursie wrote: >> Severin Gehwolf has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Only show runtime image suffix for JDK modules > > make/ToolsJdk.gmk line 88: > >> 86:

Re: RFR: 8327218: Add an ability to specify modules which should have native access enabled [v2]

2024-03-06 Thread Mandy Chung
On Wed, 6 Mar 2024 19:00:19 GMT, Alan Bateman wrote: >> Native access is needed for modules which calls restricted methods [1]. >> AFAICT, java.base, java.desktop and jdk.incubator.vector use >> java.lang.foreign but I don't know if they call restricted methods or not. >> >>

Re: RFR: 8327218: Add an ability to specify modules which should have native access enabled [v2]

2024-03-06 Thread Alan Bateman
On Wed, 6 Mar 2024 18:00:25 GMT, Mandy Chung wrote: > Native access is needed for modules which calls restricted methods [1]. In time, we'll need it for modules using JNI too. We can do this trimming in another PR to avoid Jan getting pulled into deeply. - PR Review Comment:

Re: RFR: 8327138: Clean up status management in cdsConfig.hpp and CDS.java

2024-03-06 Thread Matias Saavedra Silva
On Sat, 2 Mar 2024 01:18:06 GMT, Ioi Lam wrote: > A few clean ups: > > 1. Rename functions like "`s_loading_full_module_graph()` to > `is_using_full_module_graph()`. The meaning of "loading" is not clear: it > might be interpreted as to cover only the period where the artifact is being >

Re: RFR: 7036144: GZIPInputStream readTrailer uses faulty available() test for end-of-stream [v6]

2024-03-06 Thread Archie Cobbs
On Wed, 6 Mar 2024 14:14:56 GMT, Jaikiran Pai wrote: >> Archie Cobbs 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 six additional >> commits

RFR: 8292955: Collections.checkedMap Map.merge does not properly check key and value

2024-03-06 Thread Korov
When the specified key did not associated with a value, should check the `key` and `value` type. - Commit messages: - 8292955: Collections.checkedMap Map.merge does not properly check key and value - 8292955: Collections.checkedMap Map.merge does not properly check key and value

Re: RFR: 8327218: Add an ability to specify modules which should have native access enabled [v2]

2024-03-06 Thread Mandy Chung
On Wed, 6 Mar 2024 15:02:07 GMT, Jan Lahoda wrote: >>> Many of these modules do not need native access in the current >>> implementation. >> >> In addition this will eventually need jlink support. I view the change to >> ModuleBootstrap initialiser to use ModuleLoaderMap.nativeAccessModules()

RFR: JDK-8327487: Further augment WorstCaseTests with more cases

2024-03-06 Thread Joe Darcy
The atan2 and hypot cases added would fail for a particular test library that has errors in the millions of ulps for those inputs, rather than the small number of ulps specified for the error. - Commit messages: - JDK-8327487: Further augment WorstCaseTests with more cases

Re: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v18]

2024-03-06 Thread Magnus Ihse Bursie
On Tue, 27 Feb 2024 15:23:09 GMT, Severin Gehwolf wrote: >> Please review this patch which adds a jlink mode to the JDK which doesn't >> need the packaged modules being present. A.k.a run-time image based jlink. >> Fundamentally this patch adds an option to use `jlink` even though your JDK >>

Re: 回复:RFD: Can we remove the deprecated internal Unsafe *Object* methods?

2024-03-06 Thread Eirik Bjørsnøs
On Wed, Mar 6, 2024 at 5:41 PM Alan Bateman wrote: This discussion is about the JDK's internal Unsafe, not sun.misc.Unsafe. > Thanks Alan, I guess I should have made this more clear from the beginning. I'll await a response from the wise men on Mandy's JDK-8207146 comment before proposing a

Re: RFR: JDK-8327444: simplify RESTARTABLE macro usage in JDK codebase [v3]

2024-03-06 Thread Christoph Langer
On Wed, 6 Mar 2024 16:30:23 GMT, Matthias Baesken wrote: >> We define the RESTARTABLE macro again and again at a lot of places in the >> JDK native codebase. This could be centralized to avoid repeating it again >> and again ! > > Matthias Baesken has updated the pull request incrementally

Re: RFR: 8327218: Add an ability to specify modules which should have native access enabled [v2]

2024-03-06 Thread Magnus Ihse Bursie
On Tue, 5 Mar 2024 12:44:10 GMT, Jan Lahoda wrote: >> Currently, JDK modules load by the bootstrap and platform ClassLoaders are >> automatically granted the native access. I am working on an upgrade of JLine >> inside the `jdk.internal.le` module, and I would like to replace the current >>

Re: RFR: 8327218: Add an ability to specify modules which should have native access enabled [v2]

2024-03-06 Thread Magnus Ihse Bursie
On Wed, 6 Mar 2024 00:56:16 GMT, Jaikiran Pai wrote: >> I believe we could technically reuse the list for boot/platform modules. >> But, the intent here is to provide more control over the modules with native >> access, not only being able to add to the list, but also remove from the >> list.

Re: RFR: JDK-8327444: simplify RESTARTABLE macro usage in JDK codebase [v3]

2024-03-06 Thread Matthias Baesken
> We define the RESTARTABLE macro again and again at a lot of places in the JDK > native codebase. This could be centralized to avoid repeating it again and > again ! Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: Introduce

Re: RFR: 8323058: Revisit j.l.classfile.CodeBuilder API surface [v4]

2024-03-06 Thread Adam Sotona
On Wed, 6 Mar 2024 15:31:40 GMT, Chen Liang wrote: > Looking at 8326836 #18030, we might need `@since` tags on the new API methods. Thanks for pointing it out, I've added them. - PR Comment: https://git.openjdk.org/jdk/pull/17282#issuecomment-1981230434

Integrated: 8327261: Parsing test for Double/Float succeeds w/o testing all bad cases

2024-03-06 Thread Naoto Sato
On Tue, 5 Mar 2024 00:51:33 GMT, Naoto Sato wrote: > Fixing test cases. For bad test cases, only the first case was run, and the > rest were ignored. This pull request has now been integrated. Changeset: 9f709407 Author:Naoto Sato URL:

Re: RFR: 8327261: Parsing test for Double/Float succeeds w/o testing all bad cases [v2]

2024-03-06 Thread Naoto Sato
On Tue, 5 Mar 2024 17:26:11 GMT, Naoto Sato wrote: >> Fixing test cases. For bad test cases, only the first case was run, and the >> rest were ignored. > > Naoto Sato has updated the pull request incrementally with one additional > commit since the last revision: > > Reflects review

Re: RFR: 8323058: Revisit j.l.classfile.CodeBuilder API surface [v5]

2024-03-06 Thread Adam Sotona
> `java.lang.classfile.CodeBuilder` contains more than 230 API methods. > Existing ClassFile API use cases proved the concept one big CodeBuilder is > comfortable. However there are some redundancies, glitches in the naming > conventions, some frequently used methods are hard to find and some

Re: RFR: JDK-8327444: simplify RESTARTABLE macro usage in JDK codebase [v2]

2024-03-06 Thread Matthias Baesken
On Wed, 6 Mar 2024 15:49:05 GMT, Alan Bateman wrote: >> Matthias Baesken has updated the pull request incrementally with one >> additional commit since the last revision: >> >> introduce unix jni_util_md.h > > src/java.base/aix/native/libnio/ch/Pollset.c line 29: > >> 27: #include "jni.h"

Re: RFR: 8326718: Test java/util/Formatter/Padding.java should timeout on large inputs before fix in JDK-8299677 [v3]

2024-03-06 Thread Raffaello Giulietti
On Tue, 5 Mar 2024 23:00:16 GMT, Chad Rakoczy wrote: >> [JDK-8299677](https://bugs.openjdk.java.net/browse/JDK-8299677) fixes a bug >> with Formatter.format taking a long time when there is a lot of padding. >> This test runs Formatter.format with very large padding. Test fails before >>

Re: RFR: JDK-8327444: simplify RESTARTABLE macro usage in JDK codebase [v2]

2024-03-06 Thread Alan Bateman
On Wed, 6 Mar 2024 15:45:16 GMT, Matthias Baesken wrote: >> We define the RESTARTABLE macro again and again at a lot of places in the >> JDK native codebase. This could be centralized to avoid repeating it again >> and again ! > > Matthias Baesken has updated the pull request incrementally

Re: RFR: JDK-8327444: simplify RESTARTABLE macro usage in JDK codebase [v2]

2024-03-06 Thread Matthias Baesken
> We define the RESTARTABLE macro again and again at a lot of places in the JDK > native codebase. This could be centralized to avoid repeating it again and > again ! Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: introduce

Re: RFR: 8323058: Revisit j.l.classfile.CodeBuilder API surface [v4]

2024-03-06 Thread Chen Liang
On Wed, 6 Mar 2024 15:00:09 GMT, Adam Sotona wrote: >> `java.lang.classfile.CodeBuilder` contains more than 230 API methods. >> Existing ClassFile API use cases proved the concept one big CodeBuilder is >> comfortable. However there are some redundancies, glitches in the naming >> conventions,

Re: RFR: 8327218: Add an ability to specify modules which should have native access enabled [v2]

2024-03-06 Thread Jan Lahoda
On Wed, 6 Mar 2024 09:19:44 GMT, Alan Bateman wrote: >> Many of these modules do not need native access in the current >> implementation. Should this list be trimmed to list the ones that need >> native access in the current implementation? > >> Many of these modules do not need native

Re: RFR: 8323058: Revisit j.l.classfile.CodeBuilder API surface [v4]

2024-03-06 Thread Adam Sotona
> `java.lang.classfile.CodeBuilder` contains more than 230 API methods. > Existing ClassFile API use cases proved the concept one big CodeBuilder is > comfortable. However there are some redundancies, glitches in the naming > conventions, some frequently used methods are hard to find and some

Re: RFR: 8327218: Add an ability to specify modules which should have native access enabled [v2]

2024-03-06 Thread Jan Lahoda
On Tue, 5 Mar 2024 13:58:50 GMT, Jaikiran Pai wrote: >> Jan Lahoda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Apply suggestions from code review >> >> Co-authored-by: ExE Boss <3889017+exe-b...@users.noreply.github.com> >>

Re: RFR: 8325579: Inconsistent behavior in com.sun.jndi.ldap.Connection::createSocket [v7]

2024-03-06 Thread Aleksei Efimov
On Fri, 1 Mar 2024 10:44:14 GMT, Christoph Langer wrote: >> During analysing a customer case I figured out that we have an inconsistency >> between documentation and actual behavior in class >> com.sun.jndi.ldap.Connection. The [method documentation of >>

Re: RFR: JDK-8327444: simplify RESTARTABLE macro usage in JDK codebase

2024-03-06 Thread Alan Bateman
On Wed, 6 Mar 2024 14:25:09 GMT, Matthias Baesken wrote: > We could maybe also use the existing > https://github.com/openjdk/jdk/blob/master/src/java.base/unix/native/include/jni_md.h > - what do you think ? jni_md.h goes into the JDK run-time image (for jni.h to include) so I don't think we

Re: RFD: Can we remove the deprecated internal Unsafe *Object* methods?

2024-03-06 Thread -
Hi Wen, I think this change is for jdk.internal's Unsafe (JDK 9+) instead of for sun.misc's Unsafe. The sun.misc.Unsafe's methods have stayed "getObject" https://github.com/openjdk/jdk/blob/ae5e3fdd5922a232c9b48fc846c4fcdc8f2b2645/src/jdk.unsupported/share/classes/sun/misc/Unsafe.java#L197 instead

Re: RFR: JDK-8327444: simplify RESTARTABLE macro usage in JDK codebase

2024-03-06 Thread Matthias Baesken
On Wed, 6 Mar 2024 14:13:26 GMT, Alan Bateman wrote: >> We define the RESTARTABLE macro again and again at a lot of places in the >> JDK native codebase. This could be centralized to avoid repeating it again >> and again ! > > src/java.base/share/native/libjava/jni_util.h line 243: > >> 241:

Re: RFR: 7036144: GZIPInputStream readTrailer uses faulty available() test for end-of-stream [v6]

2024-03-06 Thread Jaikiran Pai
On Mon, 5 Feb 2024 23:53:06 GMT, Archie Cobbs wrote: >> `GZIPInputStream`, when looking for a concatenated stream, relies on what >> the underlying `InputStream` says is how many bytes are `available()`. But >> this is inappropriate because `InputStream.available()` is just an estimate >> and

Re: RFR: JDK-8327444: simplify RESTARTABLE macro usage in JDK codebase

2024-03-06 Thread Alan Bateman
On Wed, 6 Mar 2024 09:26:25 GMT, Matthias Baesken wrote: > We define the RESTARTABLE macro again and again at a lot of places in the JDK > native codebase. This could be centralized to avoid repeating it again and > again ! src/java.base/share/native/libjava/jni_util.h line 243: > 241: }

Re: 回复:RFD: Can we remove the deprecated internal Unsafe *Object* methods?

2024-03-06 Thread Alan Bateman
On 06/03/2024 10:56, wenshao wrote: Many libraries use Unsafe to improve performance, especially in many performance-critical scenarios of big data, such as Apache Flink/Apache Arrow, etc. Direct removal will make it difficult to adopt the new version of JDK. It is recommended to use it

Re: RFR: 8327460: Compile tests with the same visibility rules as product code [v2]

2024-03-06 Thread Magnus Ihse Bursie
On Wed, 6 Mar 2024 13:43:00 GMT, Magnus Ihse Bursie wrote: >> Currently, our symbol visibility handling for tests are sloppy; we only >> handle it properly on Windows. We need to bring it up to the same levels as >> product code. This is a prerequisite for >>

Re: RFR: 8327460: Compile tests with the same visibility rules as product code [v2]

2024-03-06 Thread Erik Joelsson
On Wed, 6 Mar 2024 13:43:00 GMT, Magnus Ihse Bursie wrote: >> Currently, our symbol visibility handling for tests are sloppy; we only >> handle it properly on Windows. We need to bring it up to the same levels as >> product code. This is a prerequisite for >>

Re: RFR: 8327460: Compile tests with the same visibility rules as product code [v2]

2024-03-06 Thread Magnus Ihse Bursie
> Currently, our symbol visibility handling for tests are sloppy; we only > handle it properly on Windows. We need to bring it up to the same levels as > product code. This is a prerequisite for > [JDK-8327045](https://bugs.openjdk.org/browse/JDK-8327045), which in turn is > a building block

Re: RFR: 8327460: Compile tests with the same visibility rules as product code

2024-03-06 Thread Magnus Ihse Bursie
On Wed, 6 Mar 2024 11:33:30 GMT, Magnus Ihse Bursie wrote: > Currently, our symbol visibility handling for tests are sloppy; we only > handle it properly on Windows. We need to bring it up to the same levels as > product code. This is a prerequisite for >

RFR: 8327460: Compile tests with the same visibility rules as product code

2024-03-06 Thread Magnus Ihse Bursie
Currently, our symbol visibility handling for tests are sloppy; we only handle it properly on Windows. We need to bring it up to the same levels as product code. This is a prerequisite for [JDK-8327045](https://bugs.openjdk.org/browse/JDK-8327045), which in turn is a building block for

Integrated: JDK-8325255 jdk.internal.util.ReferencedKeySet::add using wrong test

2024-03-06 Thread Jim Laskey
On Tue, 6 Feb 2024 12:52:15 GMT, Jim Laskey wrote: > Currently, add is returning intern(e) == null which will always be false. The > correct test is intern(e) == e , that is, true when element is newly added. This pull request has now been integrated. Changeset: a7461de2 Author:Jim Laskey

Re: RFR: JDK-8327444: simplify RESTARTABLE macro usage in JDK codebase

2024-03-06 Thread Guoxiong Li
On Wed, 6 Mar 2024 09:26:25 GMT, Matthias Baesken wrote: > We define the RESTARTABLE macro again and again at a lot of places in the JDK > native codebase. This could be centralized to avoid repeating it again and > again ! Looks good. Nice refactor. - Marked as reviewed by gli

回复:RFD: Can we remove the deprecated internal Unsafe *Object* methods?

2024-03-06 Thread wenshao
Many libraries use Unsafe to improve performance, especially in many performance-critical scenarios of big data, such as Apache Flink/Apache Arrow, etc. Direct removal will make it difficult to adopt the new version of JDK. It is recommended to use it similar to JEP 396, which needs to be

RFR: JDK-8327444: simplify RESTARTABLE macro usage in JDK codebase

2024-03-06 Thread Matthias Baesken
We define the RESTARTABLE macro again and again at a lot of places in the JDK native codebase. This could be centralized to avoid repeating it again and again ! - Commit messages: - JDK-8327444 Changes: https://git.openjdk.org/jdk/pull/18132/files Webrev:

Re: RFR: 8325567: jspawnhelper without args fails with segfault

2024-03-06 Thread Aleksey Shipilev
On Tue, 5 Mar 2024 20:34:47 GMT, Vladimir Petko wrote: > > The change in jspawnhelper looks good. > > I think it would be simpler to have a separate > > `jdk/java/lang/ProcessBuilder/JspawnhelperMisuse.java` test that simply > > invokes the `jspawnhelper` and verifies the proper message is

Re: RFR: 8327218: Add an ability to specify modules which should have native access enabled [v2]

2024-03-06 Thread Alan Bateman
On Tue, 5 Mar 2024 22:44:20 GMT, Mandy Chung wrote: > Many of these modules do not need native access in the current implementation. In addition this will eventually need jlink support. I view the change to ModuleBootstrap initialiser to use ModuleLoaderMap.nativeAccessModules() as very

Re: RFD: Can we remove the deprecated internal Unsafe *Object* methods?

2024-03-06 Thread Alan Bateman
On 05/03/2024 22:57, mandy.ch...@oracle.com wrote: These deprecated methods were added to make jsr166.jar to run on different JDK releases.  I think it's time to remove these deprecated xxxObject* methods as the renames have been done since JDK 12 for 5 years. Yes, I think they can be