Re: RFR: 8319123: Implement JEP 461: Stream Gatherers (Preview) [v11]

2023-11-17 Thread Alan Bateman
On Fri, 17 Nov 2023 11:28:23 GMT, Viktor Klang wrote: >> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) > > Viktor Klang has updated the pull request incrementally with one additional > commit since the last revision: > > Adding @implSpec for Gatherer.andThen, plus adds

Re: RFR: 8318966: Some methods make promises about Java array element alignment that are too strong

2023-11-16 Thread Alan Bateman
On Wed, 15 Nov 2023 22:46:03 GMT, Jorn Vernee wrote: > See the JBS issue for an extended problem description. > > This patch changes the specification and implementation of > `MethodHandles::byteArrayViewVarHandle`, > `MethodHandles::byteBufferViewVarHandle`, `ByteBuffer::alignedSlice`, and >

Re: RFE: support safely wrapping restricted FFM calls

2023-11-16 Thread Alan Bateman
On 15/11/2023 17:13, Rob Spoor wrote: Hello all, I'm working on a module that makes working with FFM easier; think of something like JNA. For instance, it allows creating structures without having to manually manage var handles etc. My module uses restricted mehods like AddressLayout.withTar

Re: RFR: JDK-8319626: Override toString() for ZipFile [v2]

2023-11-16 Thread Alan Bateman
On Wed, 15 Nov 2023 18:33:47 GMT, Justin Lu wrote: >> Please review this PR and [CSR](https://bugs.openjdk.org/browse/JDK-8319982) >> which overrides and provides an implementation of `toString()` in >> _java.util.zip.ZipFile_ (and by extension, _java.util.jar.JarFile_). >> >> This change is p

Re: RFR: 8319123: Implement JEP 461: Stream Gatherers (Preview) [v9]

2023-11-15 Thread Alan Bateman
On Wed, 15 Nov 2023 17:50:48 GMT, Viktor Klang wrote: >> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) > > Viktor Klang has updated the pull request incrementally with one additional > commit since the last revision: > > Improvements after feedback Really nicely done.

Re: RFR: 8319123: Implement JEP 461: Stream Gatherers (Preview) [v8]

2023-11-15 Thread Alan Bateman
On Tue, 14 Nov 2023 16:35:53 GMT, Viktor Klang wrote: >> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) > > Viktor Klang has updated the pull request incrementally with one additional > commit since the last revision: > > Unpacking the rethrown exceptions from Gatherers.

Re: RFR: 8317834: java/lang/Thread/IsAlive.java timed out [v2]

2023-11-14 Thread Alan Bateman
On Tue, 14 Nov 2023 17:25:42 GMT, Darragh Clarke wrote: >> Currently the `IsAlive` test occasionally times out. >> >> This PR changes the timeout from `10` to `25` which I think is an adequate >> increase based on the failures I've seen. Though I'd be happy to change it >> to another value if

Re: RFR: 8317834: java/lang/Thread/IsAlive.java timed out

2023-11-14 Thread Alan Bateman
On Tue, 14 Nov 2023 16:41:31 GMT, Darragh Clarke wrote: > Currently the `IsAlive` test occasionally times out. > > This PR changes the timeout from `10` to `25` which I think is an adequate > increase based on the failures I've seen. Though I'd be happy to change it to > another value if someo

Re: RFR: 8314480: Memory ordering spec updates in java.lang.ref

2023-11-14 Thread Alan Bateman
On Mon, 13 Nov 2023 22:31:16 GMT, Brent Christian wrote: > Classes in the `java.lang.ref` package would benefit from an update to bring > the spec in line with how the VM already behaves. The changes would focus on > _happens-before_ edges at some key points during reference processing. > > A

Re: RFR: JDK-8319122: Improve documentation of various Zip-file related APIs [v2]

2023-11-14 Thread Alan Bateman
On Fri, 10 Nov 2023 15:44:19 GMT, Yakov Shafranovich wrote: >> The various Zip/Jar-file related Java APIs have some long-standing >> differences or peculiarities with respect to the ZIP-file specification or >> compared to other implementations which should be documented in the API-doc. >> Thi

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

2023-11-13 Thread Alan Bateman
On Mon, 13 Nov 2023 15:37:29 GMT, Severin Gehwolf wrote: > It's not clear what you mean by that. Dropped from what? The CSR? Something > else? The run-image based link needs the `--add-run-image-resources` plugin > for it to work. I mean the list of plugins that are listed by --list-plugins. I

Re: RFR: JDK-8319626: Override toString() for ZipFile

2023-11-13 Thread Alan Bateman
On Mon, 13 Nov 2023 21:59:05 GMT, Justin Lu wrote: > Please review this PR and [CSR](https://bugs.openjdk.org/browse/JDK-8319982) > which overrides and provides an implementation of `toString()` in > _java.util.zip.ZipFile_ (and by extension, _java.util.jar.JarFile_). > > This change is primar

Re: RFR: 8287843: File::getCanonicalFile doesn't work for \\?\C:\ style paths DOS device paths [v8]

2023-11-13 Thread Alan Bateman
On Mon, 13 Nov 2023 19:41:48 GMT, Brian Burkhalter wrote: >> In the Windows implementation of java.io.File.getCanonicalPath, strip any >> long path or UNC prefix before canonicalizing the remainder of the pathname. > > Brian Burkhalter has updated the pull request with a new target base due to a

Re: RFR: JDK-8319122: Improve documentation of various Zip-file related APIs [v2]

2023-11-13 Thread Alan Bateman
On Mon, 13 Nov 2023 16:00:05 GMT, Yakov Shafranovich wrote: > That would probably also involve taking existing documentation such as the > note about not opening entries with "."/"..", and the POSIX permissions > mappings? Would it make sense to split the rest of the changes in this PR > from

Re: RFR: JDK-8317799 : AIX PPC64: FFI symbol lookup doesn't find symbols

2023-11-12 Thread Alan Bateman
On Fri, 10 Nov 2023 16:30:35 GMT, suchismith1993 wrote: > There is not generic way of generating this. It needs a manual intervention > and symbols are to be added on a need basis in future. Looks like a list to > be maintained. I had tried adding comments to explain the list, but that > cause

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

2023-11-12 Thread Alan Bateman
On Wed, 18 Oct 2023 17:37:30 GMT, Severin Gehwolf wrote: >> Please review this patch which adds a "jmodless" jlink mode to the JDK. >> Fundamentally this patch adds an option to use `jlink` even though your JDK >> install might not come with the packaged modules (directory `jmods`). This >> is

Re: RFR: JDK-8319122: Improve documentation of various Zip-file related APIs [v2]

2023-11-11 Thread Alan Bateman
On Fri, 10 Nov 2023 15:44:19 GMT, Yakov Shafranovich wrote: >> The various Zip/Jar-file related Java APIs have some long-standing >> differences or peculiarities with respect to the ZIP-file specification or >> compared to other implementations which should be documented in the API-doc. >> Thi

Re: RFR: 8287843: File::getCanonicalFile doesn't work for \\?\C:\ style paths DOS device paths [v7]

2023-11-11 Thread Alan Bateman
On Wed, 4 Oct 2023 20:35:25 GMT, Brian Burkhalter wrote: >> In the Windows implementation of java.io.File.getCanonicalPath, strip any >> long path or UNC prefix before canonicalizing the remainder of the pathname. > > Brian Burkhalter has updated the pull request incrementally with one > additi

Re: RFR: 8319928: Exceptions thrown by cleanup actions passed to reinterpreted segments should be ignored

2023-11-10 Thread Alan Bateman
On Fri, 10 Nov 2023 16:34:11 GMT, Maurizio Cimadamore wrote: > This simplePR tweaks the factory which wraps custom cleanup actions passed to > `MemorySegment::reinterpret`, so that any exception thrown by the custom > cleanup is swallowed when the arena is closed. > > This aligns the behavior

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview) [v3]

2023-11-10 Thread Alan Bateman
On Fri, 10 Nov 2023 09:32:17 GMT, Viktor Klang wrote: >> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) > > Viktor Klang has updated the pull request incrementally with two additional > commits since the last revision: > > - Multiple improvements to Gatherer and Gatherers

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview) [v2]

2023-11-09 Thread Alan Bateman
On Wed, 8 Nov 2023 21:08:03 GMT, Viktor Klang wrote: >> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) > > Viktor Klang has updated the pull request incrementally with two additional > commits since the last revision: > > - Addressing review feedback > - Make Gatherer.an

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview) [v2]

2023-11-09 Thread Alan Bateman
On Thu, 9 Nov 2023 09:42:41 GMT, Viktor Klang wrote: >> src/java.base/share/classes/java/util/stream/Gatherers.java line 326: >> >>> 324: >>> 325: /** >>> 326: * Gathers elements into fixed-size windows. The last window may >>> contain >> >> Returns a ... > > You mean "Returns a Gath

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

2023-11-08 Thread Alan Bateman
On Mon, 30 Oct 2023 15:38:35 GMT, Viktor Klang wrote: > This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) src/java.base/share/classes/java/util/stream/Gatherer.java line 38: > 36: /** > 37: * An intermediate operation that transforms a stream of input elements > into a > 38

Re: RFR: 8318971: jar v17 should either exit on error immediately or create archive as jar v1.8 did [v2]

2023-11-08 Thread Alan Bateman
On Wed, 8 Nov 2023 16:03:22 GMT, Ryan Wallace wrote: > Added and tested and it still works as expected. @ryawalla Would it be possible to update the PR description so there's a clear summary on the updated proposal? I think it aligns the behavior with what happens when a bad file path is speci

Re: RFR: 8319338: tools/jpackage/share/RuntimeImageTest.java fails with -XX:+UseZGC

2023-11-07 Thread Alan Bateman
On Tue, 7 Nov 2023 03:20:45 GMT, Alexey Semenyuk wrote: > Remove `-Xmx512m` from the jtreg `@run` command as @AlanBateman suggested Marked as reviewed by alanb (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/16535#pullrequestreview-1718248698

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v14]

2023-11-07 Thread Alan Bateman
On Tue, 7 Nov 2023 15:45:02 GMT, Alan Bateman wrote: >> Jim Laskey 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 14 addi

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v14]

2023-11-07 Thread Alan Bateman
On Tue, 7 Nov 2023 12:29:12 GMT, Jim Laskey wrote: >> Address changes from JEP 445 to JEP 463. >> >> - Move from a SYNTHETIC unnamed class to a MANDATED implicit class. >> >> - Don't mark class on read. >> >> - Remove reflection and annotation processing related to unnamed classes. >> >> - Si

Re: RFR: 8319374: JFR: Remove instrumentation for exception events [v3]

2023-11-07 Thread Alan Bateman
On Tue, 7 Nov 2023 11:11:31 GMT, Erik Gahlin wrote: >> Could I have a review of a PR that removes the bytecode instrumentation for >> the exception events. >> >> Testing: jdk/jdk/jfr + tier1 + tier2 > > Erik Gahlin has updated the pull request incrementally with one additional > commit since t

Re: RFR: 8319374: JFR: Remove instrumentation for exception events [v2]

2023-11-07 Thread Alan Bateman
On Tue, 7 Nov 2023 02:10:29 GMT, Erik Gahlin wrote: > I filed an issue to investigate if there is a problem with SOE, or if the OOM > check is really needed now. https://bugs.openjdk.org/browse/JDK-8319579 > > Regardless of outcome, It would be good to document the results of the > investigati

Re: RFR: 8319374: JFR: Remove instrumentation for exception events [v2]

2023-11-07 Thread Alan Bateman
On Mon, 6 Nov 2023 22:52:50 GMT, Erik Gahlin wrote: >> Could I have a review of a PR that removes the bytecode instrumentation for >> the exception events. >> >> Testing: jdk/jdk/jfr + tier1 + tier2 > > Erik Gahlin has updated the pull request incrementally with one additional > commit since t

Re: RFR: 8319436: Proxy.newProxyInstance throws NPE if loader is null and interface not visible from class loader [v2]

2023-11-06 Thread Alan Bateman
On Mon, 6 Nov 2023 20:22:43 GMT, Mandy Chung wrote: >> This is a regression caused by JDK-8302791. IAE should be thrown when an >> interface is not visible to the given class loader but NPE is thrown instead >> when the loader is null. The boot loader has no name and so the fix will >> pri

Re: RFR: 8319338: tools/jpackage/share/RuntimeImageTest.java fails with -XX:+UseZGC

2023-11-06 Thread Alan Bateman
On Tue, 7 Nov 2023 03:20:45 GMT, Alexey Semenyuk wrote: > Remove `-Xmx512m` from the jtreg `@run` command as @AlanBateman suggested Can you confirm that debug builds are passing with -XX:+UseZGC now? - PR Comment: https://git.openjdk.org/jdk/pull/16535#issuecomment-1797889256

Re: RFR: 8319436: Proxy.newProxyInstance throws NPE if loader is null and interface not visible from class loader

2023-11-06 Thread Alan Bateman
On Mon, 6 Nov 2023 19:12:28 GMT, Mandy Chung wrote: > This is a regression caused by JDK-8302791. IAE should be thrown when an > interface is not visible to the given class loader but NPE is thrown instead > when the loader is null. The boot loader has no name and so the fix will > print `

Re: RFR: 8319374: JFR: Remove instrumentation for exception events

2023-11-06 Thread Alan Bateman
On Fri, 3 Nov 2023 12:19:07 GMT, Erik Gahlin wrote: > Could I have a review of a PR that removes the bytecode instrumentation for > the exception events. > > Testing: jdk/jdk/jfr + tier1 + tier2 src/java.base/share/classes/jdk/internal/event/ThrowableTracer.java line 37: > 35: private sta

Re: RFR: 8318971: jar v17 should either exit on error immediately or create archive as jar v1.8 did

2023-11-06 Thread Alan Bateman
On Mon, 30 Oct 2023 16:16:52 GMT, Ryan Wallace wrote: > Hi all, > > Please review this fix for jar tool not producing archive if there is a > missing file supplied. Fix is to throw an exception and exit processing when > a missing file is supplied. Current behaviour will recognise missing file

Re: RFR: 8318971: jar v17 should either exit on error immediately or create archive as jar v1.8 did

2023-11-06 Thread Alan Bateman
On Mon, 30 Oct 2023 16:16:52 GMT, Ryan Wallace wrote: > Hi all, > > Please review this fix for jar tool not producing archive if there is a > missing file supplied. Fix is to throw an exception and exit processing when > a missing file is supplied. Current behaviour will recognise missing file

Re: RFR: JDK-8315457 Implementation of String Templates (Second Preview) [v4]

2023-11-04 Thread Alan Bateman
On Fri, 3 Nov 2023 15:29:25 GMT, Jim Laskey wrote: >> Update String Templates for a second preview. With the addition of >> >> - Expression type and throws are determined from the `process` method of the >> processor type and not the processor type. >> >> - Qualified `STR` and `RAW` are treate

Re: RFR: JDK-8315457 Implementation of String Templates (Second Preview) [v4]

2023-11-04 Thread Alan Bateman
On Mon, 16 Oct 2023 14:31:46 GMT, Jim Laskey wrote: > Wasn't sure about that. Thx. When in doubt, JEP 12. Alex provided good guidance for API authors on how `@since` should be used with preview APIs. - PR Review Comment: https://git.openjdk.org/jdk/pull/16202#discussion_r13823929

Re: RFR: JDK-8319122: Improve documentation of various Zip-file related APIs

2023-11-04 Thread Alan Bateman
On Mon, 30 Oct 2023 17:26:53 GMT, Yakov Shafranovich wrote: > The various Zip/Jar-file related Java APIs have some long-standing > differences or peculiarities with respect to the ZIP-file specification or > compared to other implementations which should be documented in the API-doc. > This do

Re: RFR: 8318839: Update test thread factory to catch all exceptions [v2]

2023-11-03 Thread Alan Bateman
On Fri, 3 Nov 2023 05:43:38 GMT, David Holmes wrote: > I don't understand what this is trying to do. If any virtual thread has an > uncaught exception then other virtual threads will throw it wrapped in a > RuntimeException. But the first virtual thread that completes (normally or by > throwin

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v8]

2023-11-02 Thread Alan Bateman
On Thu, 2 Nov 2023 17:53:12 GMT, Jim Laskey wrote: > I thought it was a clearer way to get rid of the side effect. It means LauncherHelper.checkAndLoadMain description will need to be updated as it says that it checks the public static void main method. But okay, I'll go through what you have

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v7]

2023-11-02 Thread Alan Bateman
On Thu, 2 Nov 2023 15:45:03 GMT, Jim Laskey wrote: > Amazingly enough I seem to have the JNI straight on the first try. Oh, I wasn't expecting that. My comment was suggesting we change LauncherHelper.checkAndLoadMain to set both appClass and mainType after the validate succeeds. -

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v4]

2023-11-02 Thread Alan Bateman
On Thu, 2 Nov 2023 12:33:27 GMT, Jim Laskey wrote: >> Address changes from JEP 445 to JEP 463. >> >> - Move from a SYNTHETIC unnamed class to a MANDATED implicit class. >> >> - Don't mark class on read. >> >> - Remove reflection and annotation processing related to unnamed classes. >> >> - Si

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v4]

2023-11-02 Thread Alan Bateman
On Thu, 2 Nov 2023 12:33:27 GMT, Jim Laskey wrote: >> Address changes from JEP 445 to JEP 463. >> >> - Move from a SYNTHETIC unnamed class to a MANDATED implicit class. >> >> - Don't mark class on read. >> >> - Remove reflection and annotation processing related to unnamed classes. >> >> - Si

Re: RFR: JDK-8315921: Invalid CSS declarations in java.lang class documentation [v2]

2023-11-02 Thread Alan Bateman
On Thu, 2 Nov 2023 10:57:15 GMT, Hannes Wallnöfer wrote: >> This change fixes two errors in inline HTML styles in the `java.lang` >> package: >> >> - wrong CSS property name in `java.lang.String` >> - CSS declaration terminated by colon instead of semicolon in >> `java.lang.Thread` >> >>

Re: RFR: JDK-8315458 Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v2]

2023-11-02 Thread Alan Bateman
On Wed, 1 Nov 2023 19:14:22 GMT, Jim Laskey wrote: >> Address changes from JEP 445 to JEP 463. >> >> - Move from a SYNTHETIC unnamed class to a MANDATED implicit class. >> >> - Don't mark class on read. >> >> - Remove reflection and annotation processing related to unnamed classes. >> >> - Si

Re: RFR: 8316969: Improve CDS module graph support for --module option [v3]

2023-11-01 Thread Alan Bateman
On Tue, 31 Oct 2023 20:45:11 GMT, Calvin Cheung wrote: > Do you prefer the `canArchive` setting be inside `if > (CDS.isDumpingStaticArchive())` like the following? > > ``` > if (CDS.isDumpingStaticArchive()) > canArchive = true; > ``` That's fine. It has been harmless to have canAr

Re: RFR: 8316969: Improve CDS module graph support for --module option [v8]

2023-11-01 Thread Alan Bateman
On Wed, 1 Nov 2023 04:34:35 GMT, Calvin Cheung wrote: >> Please review this changeset for adding support for `--module` (-m) option >> for CDS. >> Changes in the `ModuleBootstrap.java` are needed so that the >> `ArchivedModuleGraph.archive` and `ArchivedBootLayer.archive` are called if >> the

Re: RFR: JDK-8319195: Move tier 1 vector API regression tests to tier 2

2023-10-31 Thread Alan Bateman
On Tue, 31 Oct 2023 20:14:45 GMT, Joe Darcy wrote: > Due to their longer-than-typical running time and because the vector API is > not (yet) in the base module, move the vector API tests in tier 1 to tier 2. jdk_vector_sanity was added by JDK-8295970 to get some coverage in tier1. That motivat

Re: RFR: 8317609: Classfile API fails to verify /jdk.jcmd/sun/tools/jstat/Alignment.class

2023-10-31 Thread Alan Bateman
On Tue, 10 Oct 2023 15:09:41 GMT, Adam Sotona wrote: > JImageValidator has been recently converted to use ClassFile API and original > weak validation of class files was replaced with full class verification. > Unfortunately full class verification is too strong as it includes class > assignabi

Re: RFR: 8287843: File::getCanonicalFile doesn't work for \?\C:\ style paths DOS device paths [v7]

2023-10-31 Thread Alan Bateman
On Mon, 16 Oct 2023 16:31:04 GMT, Brian Burkhalter wrote: > The CSR was created. Thanks. I changed the "Compatibility Risk" to medium and expanded its description to more clearly explain the compatibility risk to fix this long standing issue. - PR Comment: https://git.openjdk.org

Re: RFR: JDK-8318467 : [jmh] tests concurrent.Queues and concurrent.ProducerConsumer hang with 101+ threads [v2]

2023-10-31 Thread Alan Bateman
On Mon, 30 Oct 2023 15:07:49 GMT, Viktor Klang wrote: >> Discussed with @DougLea and adjusting the queue capacity to at least the >> number of participating threads seems like the most sensible fix. > > Viktor Klang has updated the pull request incrementally with one additional > commit since t

Re: RFR: 8316969: Improve CDS module graph support for --module option [v3]

2023-10-31 Thread Alan Bateman
On Tue, 31 Oct 2023 06:17:34 GMT, Calvin Cheung wrote: > I've added the following field in `ArchivedModuleGraph` so that the > `get(String mainModuleName)` will check the `mainModule` before returning > `archivedModuleGraph`. `private static String mainModule;` The `mainModule` > field is also

Re: RFR: 8316969: Improve CDS module graph support for --module option [v7]

2023-10-31 Thread Alan Bateman
On Tue, 31 Oct 2023 06:11:50 GMT, Calvin Cheung wrote: >> Please review this changeset for adding support for `--module` (-m) option >> for CDS. >> Changes in the `ModuleBootstrap.java` are needed so that the >> `ArchivedModuleGraph.archive` and `ArchivedBootLayer.archive` are called if >> the

Re: RFR: JDK-8319120: Unbound ScopedValue.get() throws the wrong exception [v2]

2023-10-31 Thread Alan Bateman
On Mon, 30 Oct 2023 17:16:54 GMT, Andrew Haley wrote: >> The bug here is a thinko in `ScopedValue.scopedValueBindings()`. >> >> If the JVM runs out of resources, we throw a `VirtualMachineError`. Running >> out of resources can happen at almost any time, and can happen while >> `ScopedValue`'s

Re: RFR: 8315004: Runtime.halt() debug logging

2023-10-30 Thread Alan Bateman
On Fri, 1 Sep 2023 08:29:41 GMT, Alan Bateman wrote: >> I think you may have missed the comment in the JBS issue. Logging means >> running potentially arbitrary code, doing this at Runtime.halt time is >> problematic. I thought the conclusion from the work on Runtime.exit was

Re: RFR: JDK-8319120: Unbound ScopedValue.get() throws the wrong exception

2023-10-30 Thread Alan Bateman
On Mon, 30 Oct 2023 15:57:23 GMT, Andrew Haley wrote: > The bug here is a thinko in `ScopedValue.scopedValueBindings()`. > > If the JVM runs out of resources, we throw a `VirtualMachineError`. Running > out of resources can happen at almost any time, and can happen while > `ScopedValue`'s inte

Re: RFR: 8316969: Improve CDS module graph support for --module option [v3]

2023-10-27 Thread Alan Bateman
On Fri, 27 Oct 2023 19:03:36 GMT, Calvin Cheung wrote: > The `ArchivedModuleGraph.java` wasn't changed. So if `-m` is not specified, > the `archivedModuleGraph` is non-null; if `-m` is specified, the > `archivedModuleGraph` is null. So running `java -version`, the > archivedModuleGraph is non-

Re: RFR: 8316969: Improve CDS module graph support for --module option [v3]

2023-10-27 Thread Alan Bateman
On Fri, 27 Oct 2023 16:23:04 GMT, Calvin Cheung wrote: > I reran the script you sent me few days ago and got the expected results with > the latest changes. The checking of the main module name matches between dump > time and runtime is performed in the VM code. If an archive (even the default

Re: RFR: 8316969: Improve CDS module graph support for --module option [v3]

2023-10-27 Thread Alan Bateman
On Thu, 26 Oct 2023 21:08:07 GMT, Calvin Cheung wrote: > I've pushed another update with the following changes: > > * in the VM code, skip archiving full module graph if there's an incubator > module by checking if the ArchivedBootLayer::archivedBootLayer is available; I think we still have th

Re: RFR: 8305734: BitSet.get(int, int) always returns the empty BitSet when the Integer.MAX VALUE is set

2023-10-27 Thread Alan Bateman
On Sat, 22 Jul 2023 04:44:21 GMT, Stuart Marks wrote: >> See https://bugs.java.com/bugdatabase/view_bug?bug_id=8305734 and >> https://bugs.java.com/bugdatabase/view_bug?bug_id=JDK-8311905 > > Hi, thanks for the background and the discussion of the alternatives. I'm not > sure that drafting the

Re: RFR: 8314986: Module readability resolution is slow with large numbers of automatic modules

2023-10-26 Thread Alan Bateman
On Tue, 26 Sep 2023 14:57:58 GMT, Alan Bateman wrote: >> Fixes the issue (hopefully) by resolving automatic modules and automatic >> module dependencies after propagation of non-automatic transitive >> dependencies. The module tests run. >> >> I also added a fe

Re: RFR: 8318737: Fallback linker passes bad JNI handle [v2]

2023-10-26 Thread Alan Bateman
On Wed, 25 Oct 2023 11:16:54 GMT, Jorn Vernee wrote: >> The result of `FindClass` is a local JNI handle (in >> `find_class_from_class_loader`, called from `jni_FindClass` [1]). As such, >> we need to wrap the return value of `FindClass` in a global reference when >> storing it inside fallbackL

Re: RFR: 8318839: Update test thread factory to catch all exceptions

2023-10-26 Thread Alan Bateman
On Wed, 25 Oct 2023 21:08:01 GMT, Leonid Mesnik wrote: > The jtreg starts the main thread in a separate ThreadGroup and checks > unhandled exceptions for this group. However, it doesn't catch all unhandled > exceptions. There is a jtreg issue for this > https://bugs.openjdk.org/browse/CODETOOL

Re: RFR: 8318737: Fallback linker passes bad JNI handle

2023-10-25 Thread Alan Bateman
On Tue, 24 Oct 2023 17:01:35 GMT, Jorn Vernee wrote: > The result of `FindClass` is a local JNI handle (in > `find_class_from_class_loader`, called from `jni_FindClass` [1]). As such, we > need to wrap the return value of `FindClass` in a global reference when > storing it inside fallbackLinke

Re: RFR: 8293713 : java/net/httpclient/BufferingSubscriberTest.java fails in timeout, blocked in submission publisher

2023-10-24 Thread Alan Bateman
On Mon, 23 Oct 2023 15:28:31 GMT, Viktor Klang wrote: > Resolves a visibility issue in SubmissionPublisher by making the `waiter` > member of BufferedSubscription *volatile*. Marked as reviewed by alanb (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/16313#pullrequestrev

Re: RFR: 8318646: Integer#parseInt("") throws empty NumberFormatException message [v2]

2023-10-23 Thread Alan Bateman
On Mon, 23 Oct 2023 18:26:51 GMT, Raffaello Giulietti wrote: >> Please review this simple fix to restore the original exception message that >> existed before [16050](https://github.com/openjdk/jdk/pull/16050). > > Raffaello Giulietti has updated the pull request incrementally with one > addit

Re: RFR: 8318027: Support alternative name to jdk.internal.vm.compiler [v4]

2023-10-23 Thread Alan Bateman
On Sat, 21 Oct 2023 10:56:01 GMT, Doug Simon wrote: >> The Graal code base has >> [renamed](https://github.com/oracle/graal/commit/1e41203d10db321f86723eac90f6cd0573b08b33) >> its module to `jdk.compiler.graal` as part of preparations for Project >> Galahad. Due to the way Java modules work, t

Re: RFR: 8317678: Fix up hashCode() for ZipFile.Source.Key [v9]

2023-10-23 Thread Alan Bateman
On Mon, 23 Oct 2023 09:14:06 GMT, Sean Coffey wrote: >> Fix up java.util.zip.ZipFile$Source hashCode() impl so that duplicate Source >> objects aren't created for the same zip file. > > Sean Coffey has updated the pull request incrementally with one additional > commit since the last revision:

Re: RFR: JDK-8318476: Add resource consumption note to BigInteger and BigDecimal

2023-10-21 Thread Alan Bateman
On Sat, 21 Oct 2023 00:56:21 GMT, Joe Darcy wrote: > Add informative notes to BigInteger and BigDecimal about possible running > times, etc. The wording looks okay to me and I expect it will appear as an API note in BigInteger. However, for BigDecimal I suspect the h2 headings (for the next h

Re: RFR: 8316969: Improve CDS module graph support for --module option [v3]

2023-10-21 Thread Alan Bateman
On Fri, 20 Oct 2023 20:24:26 GMT, Calvin Cheung wrote: > I tried the above but got the following build error: > > ``` > Optimizing the exploded image > Error occurred during initialization of boot layer > java.lang.NullPointerException > ExplodedImageOptimize.gmk:39: recipe for target > '/scrat

Re: RFR: 8316969: Improve CDS module graph support for --module option [v3]

2023-10-21 Thread Alan Bateman
On Sat, 21 Oct 2023 07:42:06 GMT, Alan Bateman wrote: >>> Yes, because of the following code further up in the same method: >> >> I think what you are actually doing here is supporting archiving of the boot >> layer when the main module transitively depends on an inc

Re: RFR: 8316969: Improve CDS module graph support for --module option [v3]

2023-10-21 Thread Alan Bateman
On Sat, 21 Oct 2023 06:54:16 GMT, Alan Bateman wrote: > > Yes, because of the following code further up in the same method: > > I think what you are actually doing here is supporting archiving of the boot > layer when the main module transitively depends on an incubator modu

Re: RFR: 8316969: Improve CDS module graph support for --module option [v3]

2023-10-20 Thread Alan Bateman
On Fri, 20 Oct 2023 20:22:31 GMT, Calvin Cheung wrote: > Yes, because of the following code further up in the same method: I think what you are actually doing here is supporting archiving of the boot layer when the main module transitively depends on an incubator module. We might have to add m

Re: RFR: 8317678: Fix up hashCode() for ZipFile.Source.Key [v8]

2023-10-20 Thread Alan Bateman
On Wed, 18 Oct 2023 15:59:13 GMT, Sean Coffey wrote: >> Fix up java.util.zip.ZipFile$Source hashCode() impl so that duplicate Source >> objects aren't created for the same zip file. > > Sean Coffey has updated the pull request incrementally with one additional > commit since the last revision:

Re: RFR: 8318027: Support alternative name to jdk.internal.vm.compiler [v3]

2023-10-20 Thread Alan Bateman
On Fri, 20 Oct 2023 15:45:50 GMT, Doug Simon wrote: >> The Graal code base has >> [renamed](https://github.com/oracle/graal/commit/1e41203d10db321f86723eac90f6cd0573b08b33) >> its module to `jdk.compiler.graal` as part of preparations for Project >> Galahad. Due to the way Java modules work, t

Re: RFR: 8318598: FFM stylistic cleanups

2023-10-20 Thread Alan Bateman
On Fri, 20 Oct 2023 13:35:59 GMT, Jorn Vernee wrote: > Port over stylistic changes from the panama-foreign repo. The following PRs > are included: > > - https://github.com/openjdk/panama-foreign/pull/863 > - https://github.com/openjdk/panama-foreign/pull/888 > - https://github.com/openjdk/panam

Re: RFR: 8316969: Improve CDS module graph support for --module option [v3]

2023-10-20 Thread Alan Bateman
On Thu, 19 Oct 2023 15:21:55 GMT, Calvin Cheung wrote: >> Please review this changeset for adding support for `--module` (-m) option >> for CDS. >> Changes in the `ModuleBootstrap.java` are needed so that the >> `ArchivedModuleGraph.archive` and `ArchivedBootLayer.archive` are called if >> the

Re: RFR: 8316969: Improve CDS module graph support for --module option [v3]

2023-10-20 Thread Alan Bateman
On Thu, 19 Oct 2023 15:21:55 GMT, Calvin Cheung wrote: >> Please review this changeset for adding support for `--module` (-m) option >> for CDS. >> Changes in the `ModuleBootstrap.java` are needed so that the >> `ArchivedModuleGraph.archive` and `ArchivedBootLayer.archive` are called if >> the

Re: RFR: 8316969: Improve CDS module graph support for --module option [v3]

2023-10-20 Thread Alan Bateman
On Thu, 19 Oct 2023 15:21:55 GMT, Calvin Cheung wrote: >> Please review this changeset for adding support for `--module` (-m) option >> for CDS. >> Changes in the `ModuleBootstrap.java` are needed so that the >> `ArchivedModuleGraph.archive` and `ArchivedBootLayer.archive` are called if >> the

Re: RFR: 8318601: Remove javadoc text about restricted methods

2023-10-20 Thread Alan Bateman
On Fri, 20 Oct 2023 13:59:16 GMT, Maurizio Cimadamore wrote: > This simple PR removes the extra verbiage from the javadoc of all the > restricted methods. > Since now javadoc will automatically generate better "bubbles" for restricted > methods, this wording is no longer necessary. Marked as

Re: RFC: CSR review for run-image-based jlink

2023-10-19 Thread Alan Bateman
On 19/10/2023 14:12, Severin Gehwolf wrote: Hi, Could I please get some reviews on the CSR for a feature that would allow runtime image-based jlinks (no need for the packaged modules - jmods folder - being present)? https://bugs.openjdk.org/browse/JDK-8317420 It would be particularly helpful t

Re: RFR: 8318486: Rename JavaLangAccess.newString/getBytesUTF8NoRepl to FailFast

2023-10-19 Thread Alan Bateman
On Thu, 19 Oct 2023 07:04:50 GMT, Chen Liang wrote: > NoRepl means "no replication", which is not what these APIs are for. I assume it's "no replace", meaning it reports the error rather than use the coder's replacement value. I agree it could be renamed but I think look at CodingErrorAction

Re: RFR: 8318200: String::newStringNoRepl and String::getBytesNoRepl does not throw CharacterCodingException [v5]

2023-10-18 Thread Alan Bateman
On Wed, 18 Oct 2023 16:27:58 GMT, Roger Riggs wrote: > The new usages that are driving this change would be better served by a > method dedicated to creating latin1 strings from a caller provided byte > array. The JavaLangAccess shared secret interface is already overused, but it > is cleaner,

Re: Request for JCK17 tests exclusion

2023-10-18 Thread Alan Bateman
On 18/10/2023 15:55, Nandagiri, Ramadasu (NSDi) wrote: Hi, Please see the discussion in the following mails. One of the TCK test cases, api/java_net/MulticastSocket/ClassLevel.html is failing on NonStop platform as NonStop doesn't support IP_MULTICAST_ALL option. We would like this test case

Re: RFR: 8317678: Fix up hashCode() for ZipFile.Source.Key [v7]

2023-10-18 Thread Alan Bateman
On Wed, 18 Oct 2023 10:09:29 GMT, Sean Coffey wrote: >> Fix up java.util.zip.ZipFile$Source hashCode() impl so that duplicate Source >> objects aren't created for the same zip file. > > Sean Coffey has updated the pull request incrementally with one additional > commit since the last revision:

Re: RFR: 8316969: Improve CDS module graph support for --module option

2023-10-17 Thread Alan Bateman
On Mon, 2 Oct 2023 22:17:34 GMT, Calvin Cheung wrote: > Please review this changeset for adding support for `--module` (-m) option > for CDS. > Changes in the `ModuleBootstrap.java` are needed so that the > `ArchivedModuleGraph.archive` and `ArchivedBootLayer.archive` are called if > the main

Re: RFR: 8316969: Improve CDS module graph support for --module option

2023-10-17 Thread Alan Bateman
On Thu, 5 Oct 2023 16:18:57 GMT, Ioi Lam wrote: > Maybe we can add a new native method > `jdk.internal.misc.CDS.isBuiltinModule(Module m)` which tests if > `ModuleEntry::_location` starts with `"jrt:"`? There isn't any really notion of "built-in module", they may be modules in the run-time im

Re: RFR: 8316969: Improve CDS module graph support for --module option

2023-10-17 Thread Alan Bateman
On Mon, 2 Oct 2023 22:17:34 GMT, Calvin Cheung wrote: > Please review this changeset for adding support for `--module` (-m) option > for CDS. > Changes in the `ModuleBootstrap.java` are needed so that the > `ArchivedModuleGraph.archive` and `ArchivedBootLayer.archive` are called if > the main

Re: RFR: 8318200: String::newStringNoRepl and String::getBytesNoRepl does not throw CharacterCodingException [v4]

2023-10-17 Thread Alan Bateman
On Tue, 17 Oct 2023 11:11:52 GMT, Shaojin Wen wrote: >> When calling String::newStringNoRepl and String::getBytesNoRepl, we need to >> use try...catch to handle CharacterCodingException and throw >> IllegalArgumentException instead of CharacterCodingException to make the >> calling code cleane

Re: RFR: 8318200: String::newStringNoRepl and String::getBytesNoRepl does not throw CharacterCodingException [v4]

2023-10-17 Thread Alan Bateman
On Tue, 17 Oct 2023 11:11:52 GMT, Shaojin Wen wrote: >> When calling String::newStringNoRepl and String::getBytesNoRepl, we need to >> use try...catch to handle CharacterCodingException and throw >> IllegalArgumentException instead of CharacterCodingException to make the >> calling code cleane

Re: RFR: 8318200: String::newStringNoRepl and String::getBytesNoRepl does not throw CharacterCodingException [v2]

2023-10-17 Thread Alan Bateman
On Tue, 17 Oct 2023 03:09:09 GMT, Chen Liang wrote: > The thrown CCE was intended for `Files.readString` and `Files.writeString`, > and is in reality, only used by those 2 sites. However, you missed updating > those sites, so they now throw IAE instead of CCE, which should be fixed. Right, the

Re: RFR: JDK-8315457 Implementation of String Templates (Second Preview)

2023-10-16 Thread Alan Bateman
On Mon, 16 Oct 2023 13:41:55 GMT, Jim Laskey wrote: > Update String Templates for a second preview. With the addition of > > - Expression type and throws are determined from the `process` method of the > processor type and not the processor type. > > - Qualified `STR` and `RAW` are treated the

Re: RFR: 8317678: Fix up hashCode() for ZipFile.Source.Key [v4]

2023-10-16 Thread Alan Bateman
On Fri, 13 Oct 2023 12:18:41 GMT, Sean Coffey wrote: >> Fix up java.util.zip.ZipFile$Source hashCode() impl so that duplicate Source >> objects aren't created for the same zip file. > > Sean Coffey has updated the pull request incrementally with one additional > commit since the last revision:

Re: RFR: 8317678: Fix up hashCode() for ZipFile.Source.Key [v4]

2023-10-16 Thread Alan Bateman
On Fri, 13 Oct 2023 12:18:41 GMT, Sean Coffey wrote: >> Fix up java.util.zip.ZipFile$Source hashCode() impl so that duplicate Source >> objects aren't created for the same zip file. > > Sean Coffey has updated the pull request incrementally with one additional > commit since the last revision:

Re: RFR: 8318126: Refresh manpages

2023-10-15 Thread Alan Bateman
On Mon, 16 Oct 2023 01:18:52 GMT, David Holmes wrote: > The open nroff manpage files are out of sync with their closed markdown > sources and need to be refreshed. > > The changes to apply are coming from: > > - [JDK-8288158](https://bugs.openjdk.org/browse/JDK-8288158): Add an anchor > to ea

Re: RFR: 8318058: Notify the jvm when the direct memory is oom

2023-10-12 Thread Alan Bateman
On Fri, 13 Oct 2023 03:23:04 GMT, xpbob wrote: > Big data processes often experience situations where the direct memory oom > process is alive but not serving properly. If the direct memory is oom, code > can notify the jvm. Can bring the following benefits: > 1. Analysis of direct memory Java.

Re: RFR: JDK-8317959: Check return values of malloc in native java.base coding [v2]

2023-10-12 Thread Alan Bateman
On Thu, 12 Oct 2023 14:16:55 GMT, Matthias Baesken wrote: >> There are a few remaining places in java.base where the return value >> NULL-check of malloc is missing. This should better be adjusted. > > Matthias Baesken has updated the pull request incrementally with one > additional commit sinc

Re: RFR: JDK-8317959: Check return values of malloc in native java.base coding [v2]

2023-10-12 Thread Alan Bateman
On Thu, 12 Oct 2023 12:17:27 GMT, Matthias Baesken wrote: >> There are a few remaining places in java.base where the return value >> NULL-check of malloc is missing. This should better be adjusted. > > Matthias Baesken has updated the pull request incrementally with one > additional commit sinc

Re: RFR: 8288899: java/util/concurrent/ExecutorService/CloseTest.java failed with "InterruptedException: sleep interrupted" [v49]

2023-10-12 Thread Alan Bateman
On Wed, 11 Oct 2023 13:07:08 GMT, Doug Lea wrote: >> Addresses Jdk 8288899 : java/util/concurrent/ExecutorService/CloseTest.java >> failed with "InterruptedException: sleep interrupted" and related issues. >> >> This is a major ForkJoin update (and hard to review -- sorry) that finally >> addr

<    3   4   5   6   7   8   9   10   11   12   >