Re: RFC: 8318776: Require supports_cx8 to always be true

2023-10-25 Thread David Holmes
Adding in porters-dev On 25/10/2023 5:12 pm, David Holmes wrote: From  https://bugs.openjdk.org/browse/JDK-8318776 Regardless of platform size (32-bit or 64-bit) the Java language has always required that the underlying platform (or the VM) provides a means of performing atomic load and

Re: RFR: 8318586: Explicitly handle upcall stub allocation failure [v2]

2023-10-25 Thread Maurizio Cimadamore
On Wed, 25 Oct 2023 10:10:57 GMT, Jorn Vernee wrote: >> Explicitly handle UpcallStub allocation failures by terminating. We >> currently might try to use the returned `nullptr` which would fail sooner or >> later. This patch just makes the termination explicit. > > Jorn Vernee has updated the

Re: RFR: 8318364: Add an FFM-based implementation of harfbuzz OpenType layout [v4]

2023-10-25 Thread Phil Race
> 8318364: Add an FFM-based implementation of harfbuzz OpenType layout Phil Race has updated the pull request incrementally with one additional commit since the last revision: indentation - Changes: - all: https://git.openjdk.org/jdk/pull/15476/files - new:

Re: RFR: 8315097: Rename createJavaProcessBuilder [v7]

2023-10-25 Thread Roger Riggs
On Wed, 25 Oct 2023 08:44:29 GMT, Leo Korinth wrote: >> This pull request renames `createJavaProcessBuilder` to >> `createLimitedTestJavaProcessBuilder` and renames `createTestJvm` to >> `createTestJavaProcessBuilder`. Both are implemented through a private >> `createJavaProcessBuilder`. It

Re: RFR: 8254693: Add Panama feature to pass heap segments to native code [v12]

2023-10-25 Thread Jorn Vernee
On Tue, 24 Oct 2023 15:09:57 GMT, Jorn Vernee wrote: >> Add the ability to pass heap segments to native code. This requires using >> `Linker.Option.critical(true)` as a linker option. It has the same >> limitations as normal critical calls, namely: upcalls into Java are not >> allowed, and

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

2023-10-25 Thread Leonid Mesnik
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/CODETOOLS-7903526. Catching such issues for virtual threads is important

Integrated: 8318186: ChoiceFormat inconsistency between applyPattern() and setChoices()

2023-10-25 Thread Justin Lu
On Mon, 23 Oct 2023 17:16:08 GMT, Justin Lu wrote: > Please review this PR which clarifies inconsistency between > `ChoiceFormat::applyPattern` and `ChoiceFormat::setChoices`. > > A `ChoiceFormat` is composed of limits and formats. `applyPattern()` will > throw an exception if limits are not

Integrated: 8318613: ChoiceFormat patterns are not well tested

2023-10-25 Thread Justin Lu
On Mon, 23 Oct 2023 21:15:44 GMT, Justin Lu wrote: > Please review this PR which adds a test for ChoiceFormat intended to test a > wide range of ChoiceFormat patterns. > > The existing test _Bug4387255_ only tests a singular basic pattern and does > not test for incorrect patterns either. >

Integrated: 8318487: Specification of the ListFormat.equals() method can be improved

2023-10-25 Thread Naoto Sato
On Mon, 23 Oct 2023 18:40:26 GMT, Naoto Sato wrote: > Spec clarification of `ListFormat.equals()` method, utilizing newly > introduced `getLocale()` and `getPatterns()`. A corresponding CSR has also > been drafted. This pull request has now been integrated. Changeset: a5208870 Author:

Re: RFR: 8308753: Class-File API transition to Preview [v23]

2023-10-25 Thread Adam Sotona
> Classfile API is an internal library under package `jdk.internal.classfile`  > in JDK 21. > This pull request turns the Classfile API into a preview feature and moves it > into `java.lang.classfile`. > It repackages all uses across JDK and tests and adds lots of missing Javadoc. > > This PR

Re: RFR: 8318678: Vector access on heap MemorySegments only works for byte[]

2023-10-25 Thread Quan Anh Mai
On Wed, 25 Oct 2023 13:08:06 GMT, Per Minborg wrote: > This PR proposes removing the restriction that only heap `MemorySegment` > wrapping a `byte` array can be accessed by Vectors. Now any array type can be > used provided the element alignment constraints are respected. Vector loads and

Re: RFR: 8318678: Vector access on heap MemorySegments only works for byte[]

2023-10-25 Thread Chris Hegarty
On Wed, 25 Oct 2023 14:01:09 GMT, Maurizio Cimadamore wrote: >> This PR proposes removing the restriction that only heap `MemorySegment` >> wrapping a `byte` array can be accessed by Vectors. Now any array type can >> be used provided the element alignment constraints are respected. > >

Re: RFR: 8318678: Vector access on heap MemorySegments only works for byte[]

2023-10-25 Thread Maurizio Cimadamore
On Wed, 25 Oct 2023 13:08:06 GMT, Per Minborg wrote: > This PR proposes removing the restriction that only heap `MemorySegment` > wrapping a `byte` array can be accessed by Vectors. Now any array type can be > used provided the element alignment constraints are respected.

Re: RFR: 8318678: Vector access on heap MemorySegments only works for byte[]

2023-10-25 Thread Maurizio Cimadamore
On Wed, 25 Oct 2023 13:08:06 GMT, Per Minborg wrote: > This PR proposes removing the restriction that only heap `MemorySegment` > wrapping a `byte` array can be accessed by Vectors. Now any array type can be > used provided the element alignment constraints are respected.

Re: RFR: 8318678: Vector access on heap MemorySegments only works for byte[]

2023-10-25 Thread Maurizio Cimadamore
On Wed, 25 Oct 2023 13:08:06 GMT, Per Minborg wrote: > This PR proposes removing the restriction that only heap `MemorySegment` > wrapping a `byte` array can be accessed by Vectors. Now any array type can be > used provided the element alignment constraints are respected.

RFR: 8318678: Vector access on heap MemorySegments only works for byte[]

2023-10-25 Thread Per Minborg
This PR proposes removing the restriction that only heap `MemorySegment` wrapping a `byte` array can be accessed by Vectors. Now any array type can be used provided the element alignment constraints are respected. - Commit messages: - Vector access on heap MemorySegments for all

Re: RFR: 8254693: Add Panama feature to pass heap segments to native code [v12]

2023-10-25 Thread Jorn Vernee
On Tue, 24 Oct 2023 15:09:57 GMT, Jorn Vernee wrote: >> Add the ability to pass heap segments to native code. This requires using >> `Linker.Option.critical(true)` as a linker option. It has the same >> limitations as normal critical calls, namely: upcalls into Java are not >> allowed, and

Re: RFR: 8318364: Add an FFM-based implementation of harfbuzz OpenType layout [v3]

2023-10-25 Thread Magnus Ihse Bursie
On Fri, 20 Oct 2023 23:03:50 GMT, Phil Race wrote: >> 8318364: Add an FFM-based implementation of harfbuzz OpenType layout > > Phil Race has updated the pull request incrementally with one additional > commit since the last revision: > > Use new arrayElementVarHandle method

RFR: JDK-8318736: com/sun/jdi/JdwpOnThrowTest.java failed with "transport error 202: bind failed: Address already in use"

2023-10-25 Thread Johannes Bechberger
Fix race condition in debugger port selection, introduced with [JDK-8317920](https://bugs.openjdk.org/browse/JDK-8317920). Tested on my Mac M1, but it doesn't contain platform-dependent code. - Commit messages: - Fix Debuggee creation Changes:

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

2023-10-25 Thread Jorn Vernee
On Wed, 25 Oct 2023 09:32:42 GMT, Aleksey Shipilev wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> explicitly propagate fallback library init failures > >

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

2023-10-25 Thread Jorn Vernee
> 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 fallbackLinker.c. > > While investigating this, I also noticed an

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

2023-10-25 Thread Aleksey Shipilev
On Wed, 25 Oct 2023 10:05:22 GMT, Jorn Vernee wrote: >> The old code would throw `ShouldNotReachHere()` if we did not recognize the >> handle type: >> https://github.com/openjdk/jdk/blob/d2d1592dd94e897fae6fc4098e43b4fffb6d6750/src/hotspot/share/runtime/jniHandles.cpp#L207 >> >> I think the

Re: RFR: 8318586: Explicitly handle upcall stub allocation failure [v2]

2023-10-25 Thread Jorn Vernee
> Explicitly handle UpcallStub allocation failures by terminating. We currently > might try to use the returned `nullptr` which would fail sooner or later. > This patch just makes the termination explicit. Jorn Vernee has updated the pull request incrementally with one additional commit since

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

2023-10-25 Thread Jorn Vernee
On Wed, 25 Oct 2023 10:01:29 GMT, Aleksey Shipilev wrote: >> Not sure what you're saying here. As far as I understand the intent of this >> code is to check whether the handle is of a certain type, and if it's not >> recognized, return `JNIInvalidRefType`. So, I'm not sure there should be any

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

2023-10-25 Thread Aleksey Shipilev
On Wed, 25 Oct 2023 09:46:44 GMT, Jorn Vernee wrote: >> src/hotspot/share/runtime/jniHandles.cpp line 202: >> >>> 200: ShouldNotReachHere(); >>> 201: } >>> 202: } else if (is_local_handle(thread, handle) || >>> is_frame_handle(thread, handle)) { >> >> Should we still add

Re: RFR: 8318586: Explicitly handle upcall stub allocation failure

2023-10-25 Thread Jorn Vernee
On Wed, 25 Oct 2023 09:56:45 GMT, Aleksey Shipilev wrote: > this PR does not change the failure mode substantially, right? That's right. - PR Comment: https://git.openjdk.org/jdk/pull/16311#issuecomment-1778922469

Re: RFR: 8318586: Explicitly handle upcall stub allocation failure

2023-10-25 Thread Aleksey Shipilev
On Mon, 23 Oct 2023 13:58:27 GMT, Jorn Vernee wrote: > Explicitly handle UpcallStub allocation failures by terminating. We currently > might try to use the returned `nullptr` which would fail sooner or later. > This patch just makes the termination explicit. Marked as reviewed by shade

Re: RFR: 8318586: Explicitly handle upcall stub allocation failure

2023-10-25 Thread Aleksey Shipilev
On Wed, 25 Oct 2023 09:54:14 GMT, Jorn Vernee wrote: > I'll wait with this PR until we reach some conclusion. I think we can proceed with this PR. The explicit failure is still better than a failure somewhere downstream. That is, this PR does not change the failure mode substantially, right?

Re: RFR: 8318586: Explicitly handle upcall stub allocation failure

2023-10-25 Thread Jorn Vernee
On Wed, 25 Oct 2023 09:47:13 GMT, Aleksey Shipilev wrote: > > But it sounds like you're saying that plain user code should never result > > in a VM error (if we can help it). > > Yes, exactly. Granted, there are resource exhaustion situations where the > overall progress could be sluggish

Re: RFR: 8318586: Explicitly handle upcall stub allocation failure

2023-10-25 Thread Aleksey Shipilev
On Wed, 25 Oct 2023 09:41:33 GMT, Jorn Vernee wrote: > But it sounds like you're saying that plain user code should never result in > a VM error (if we can help it). Yes, exactly. Granted, there are resource exhaustion situations where the overall progress could be sluggish (e.g. if we near

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

2023-10-25 Thread Jorn Vernee
On Wed, 25 Oct 2023 09:29:43 GMT, Aleksey Shipilev 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

Re: RFR: 8318586: Explicitly handle upcall stub allocation failure

2023-10-25 Thread Jorn Vernee
On Wed, 25 Oct 2023 09:16:25 GMT, Aleksey Shipilev wrote: > I find it pretty weird to terminate the VM if we cannot allocate upcall stub. > Does this mean the user code could actually terminate the VM on this `fatal`? > Unit test suggests so. > > Can the VM code actually handle things without

Re: RFR: 8318586: Explicitly handle upcall stub allocation failure

2023-10-25 Thread Jorn Vernee
On Wed, 25 Oct 2023 09:13:56 GMT, Aleksey Shipilev wrote: >> Explicitly handle UpcallStub allocation failures by terminating. We >> currently might try to use the returned `nullptr` which would fail sooner or >> later. This patch just makes the termination explicit. > >

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

2023-10-25 Thread Aleksey Shipilev
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

Re: RFR: 8318586: Explicitly handle upcall stub allocation failure

2023-10-25 Thread Aleksey Shipilev
On Mon, 23 Oct 2023 13:58:27 GMT, Jorn Vernee wrote: > Explicitly handle UpcallStub allocation failures by terminating. We currently > might try to use the returned `nullptr` which would fail sooner or later. > This patch just makes the termination explicit. I find it pretty weird to

Re: RFR: 8318705: [macos] ProblemList java/rmi/registry/multipleRegistries/MultipleRegistries.java

2023-10-25 Thread Jaikiran Pai
On Tue, 24 Oct 2023 09:51:20 GMT, Goetz Lindenmaier wrote: > …tipleRegistries.java > > The test fails in our CI with the message listed here. We see both, aarch and > x86_64. It happens rarely, but a long time back. Looks OK to me, but I think the serviceability area reviewers might want to

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

2023-10-25 Thread Jaikiran Pai
On Wed, 25 Oct 2023 09:05:11 GMT, Jaikiran Pai 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-8315921: Invalid CSS declarations in java.lang class documentation

2023-10-25 Thread Jaikiran Pai
On Fri, 15 Sep 2023 13:56:21 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` > > Both

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

2023-10-25 Thread Jorn Vernee
On Tue, 24 Oct 2023 19:49:17 GMT, Alan Bateman 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

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

RFR: 8318737: Fallback linker passes bad JNI handle

2023-10-25 Thread Jorn Vernee
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 fallbackLinker.c. While investigating this, I also noticed an existing bug

Re: RFR: 8315097: Rename createJavaProcessBuilder [v7]

2023-10-25 Thread Leo Korinth
> This pull request renames `createJavaProcessBuilder` to > `createLimitedTestJavaProcessBuilder` and renames `createTestJvm` to > `createTestJavaProcessBuilder`. Both are implemented through a private > `createJavaProcessBuilder`. It also updates the java doc. > > This is so that it should be

Re: RFR: 8315097: Rename createJavaProcessBuilder [v3]

2023-10-25 Thread Stefan Karlsson
On Tue, 5 Sep 2023 18:05:34 GMT, Roger Riggs wrote: >> I have created an alternative that uses enums to force the user to make a >> decision: >> https://github.com/openjdk/jdk/compare/master...lkorinth:jdk:+process_tools >> . Another alternative is to do the same but instead using an enum (I

RFC: 8318776: Require supports_cx8 to always be true

2023-10-25 Thread David Holmes
From https://bugs.openjdk.org/browse/JDK-8318776 Regardless of platform size (32-bit or 64-bit) the Java language has always required that the underlying platform (or the VM) provides a means of performing atomic load and store of 64-bit values, for volatile long and double support. Since

Re: RFR: 8274122: java/io/File/createTempFile/SpecialTempFile.java fails in Windows 11 [v3]

2023-10-25 Thread Daniel Jeliński
On Tue, 24 Oct 2023 22:57:59 GMT, Brian Burkhalter wrote: >> Windows 11 does not reserve as many names as prior versions of Windows so do >> not expect exceptions for COM7 and LPT1. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last

RFR: 8318705: [macos] ProblemList java/rmi/registry/multipleRegistries/MultipleRegistries.java

2023-10-25 Thread Goetz Lindenmaier
…tipleRegistries.java The test fails in our CI with the message listed here. We see both, aarch and x86_64. It happens rarely, but a long time back. - Commit messages: - 8318705: [macos] ProblemList java/rmi/registry/multipleRegistries/MultipleRegistries.java Changes:

Re: RFR: 8318705: [macos] ProblemList java/rmi/registry/multipleRegistries/MultipleRegistries.java

2023-10-25 Thread Lutz Schmidt
On Tue, 24 Oct 2023 09:51:20 GMT, Goetz Lindenmaier wrote: > …tipleRegistries.java > > The test fails in our CI with the message listed here. We see both, aarch and > x86_64. It happens rarely, but a long time back. LGTM. - Marked as reviewed by lucy (Reviewer). PR Review: