Re: a plea for blocking peek

2023-05-01 Thread John Hendrikx
Hi, I think it would help if you describe your problem a bit more directly.  Currently there is a lot of mention of difficulty levels, usual approaches and "winning", which really doesn't help to ascertain what you are trying to achieve. For a good re-evaluation of your request, you are going

Re: RFR: 8302496: Runtime.exit incorrectly says it never throws an exception [v3]

2023-05-01 Thread Alan Bateman
On Tue, 2 May 2023 04:48:07 GMT, Stuart Marks wrote: >> Textual specification clarifications. > > Stuart Marks has updated the pull request incrementally with one additional > commit since the last revision: > > Update Runtime.halt. Updated version, and the wording of halt's description, loo

Re: RFR: 8305919: java/lang/Thread/virtual/HoldsLock.java#id0 failed, ThreadInfo.getLockInfo() return null

2023-05-01 Thread Jaikiran Pai
On Sun, 30 Apr 2023 18:18:09 GMT, Alan Bateman wrote: > HoldsLock.java#id0 has been failing intermittently recently due to threads > left over from previous tests terminating. HoldsLock.java#id1 doesn't fail as > it runs in /othervm mode. The test uses ThreadMXBean::getAllThreadIds to get > th

Re: RFR: 8302496: Runtime.exit incorrectly says it never throws an exception [v3]

2023-05-01 Thread Stuart Marks
> Textual specification clarifications. Stuart Marks has updated the pull request incrementally with one additional commit since the last revision: Update Runtime.halt. - Changes: - all: https://git.openjdk.org/jdk/pull/13706/files - new: https://git.openjdk.org/jdk/pull/1370

Re: RFR: 8302496: Runtime.exit incorrectly says it never throws an exception [v3]

2023-05-01 Thread Stuart Marks
On Mon, 1 May 2023 16:11:59 GMT, Stuart Marks wrote: >> One thing you could do is reduce the words down to something like "Unless >> denied exiting by the security manager, this method blocks indefinitely ..." >> to avoid complicating the first paragraph with something that only arises >> with

Re: RFR: 8302496: Runtime.exit incorrectly says it never throws an exception [v2]

2023-05-01 Thread Stuart Marks
> Textual specification clarifications. Stuart Marks has updated the pull request incrementally with two additional commits since the last revision: - Rewording per suggestions. - Use new link syntax. - Changes: - all: https://git.openjdk.org/jdk/pull/13706/files - new: https

Integrated: 8298087: XML Schema Validation reports an required attribute twice via ErrorHandler

2023-05-01 Thread Joe Wang
On Fri, 28 Apr 2023 17:08:10 GMT, Joe Wang wrote: > Fix a copy n paste error in XMLSchemaValidator. When the patch was applied > while updating to Xerces 2.12.2, the original code was not removed, resulting > in reporting validation error twice. This pull request has now been integrated. Chan

Withdrawn: 8297286: runtime/vthread tests crashing after JDK-8296324

2023-05-01 Thread Serguei Spitsyn
On Wed, 23 Nov 2022 00:24:28 GMT, Serguei Spitsyn wrote: > This problem has two sides. > One is that the `VirtualThread::run() `cashes the field `notifyJvmtiEvents` > value. > It caused the native method `notifyJvmtiUnmountBegin()` not called after the > field `notifyJvmtiEvents` > value has be

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-01 Thread Stuart Marks
Hi Rémi, Thanks for trying out the latest build! I'll make sure this gets mentioned in the release note for Sequenced Collections. We'll also raise this issue when we talk about this feature in the Quality Outreach program. s'marks On 4/29/23 3:46 AM, Remi Forax wrote: I've several reposit

Re: RFR: 8302822: Method/Field/Constructor/RecordComponent::getGenericInfo() is not thread safe [v2]

2023-05-01 Thread Chen Liang
On Wed, 15 Mar 2023 02:37:05 GMT, Chen Liang wrote: >> 8302822: Method/Field/Constructor/RecordComponent::getGenericInfo() is not >> thread safe > > Chen Liang has updated the pull request with a new target base due to a merge > or a rebase. The incremental webrev excludes the unrelated changes

Re: RFR: 8303796: Optionally build fully statically linked JDK image [v2]

2023-05-01 Thread Jiangli Zhou
On Sat, 29 Apr 2023 03:57:53 GMT, Jiangli Zhou wrote: >> Initial implementation for supporting building a fully statically linked >> (with a desired set of JDK native libraries and libjvm) Java launcher >> executable, which is named as 'javastatic'. >> >> In this PR, the support is only added

Re: RFR: 6983726: Reimplement MethodHandleProxies.asInterfaceInstance [v11]

2023-05-01 Thread Jorn Vernee
On Mon, 1 May 2023 22:25:31 GMT, Jorn Vernee wrote: > Type profiling works for the HC type we define, we inline `HC::foo`, and find > that: hey, in HC::foo's implementation, the target MH is constant, so we can > inline through that as well. Giving us once again, optimal performance. My fear i

Re: RFR: 8298087: XML Schema Validation reports an required attribute twice via ErrorHandler [v2]

2023-05-01 Thread Naoto Sato
On Sat, 29 Apr 2023 01:32:23 GMT, Joe Wang wrote: >> Fix a copy n paste error in XMLSchemaValidator. When the patch was applied >> while updating to Xerces 2.12.2, the original code was not removed, >> resulting in reporting validation error twice. > > Joe Wang has updated the pull request incr

Re: RFR: 6983726: Reimplement MethodHandleProxies.asInterfaceInstance [v11]

2023-05-01 Thread Jorn Vernee
On Mon, 1 May 2023 21:00:40 GMT, John R Rose wrote: > HC fields are supposed to fold up; if they don’t we can help them in this > case. (That is, constant folding of the MH pointer should not be a roadblock; > that’s on the JIT to fix by adjusting the TrustFinalFields logic.) The issue with th

Re: RFR: 6983726: Reimplement MethodHandleProxies.asInterfaceInstance [v11]

2023-05-01 Thread Johannes Kuhn
On Mon, 1 May 2023 22:11:58 GMT, John R Rose wrote: > JDK platform code Yes. This works if the class is in a non-user module. Otherwise exporting an internal package would expose that to user-code as well. `java.lang.reflect.Proxy` does need to inject the proxy class into user-packages if on

Re: RFR: 6983726: Reimplement MethodHandleProxies.asInterfaceInstance [v11]

2023-05-01 Thread Chen Liang
On Mon, 1 May 2023 21:00:40 GMT, John R Rose wrote: > I think you could do this by having the HC have a final non-static field for > each required MH (one per overload point); each os an asType adaptation of > the original MH. The actual code of each HC implementation method would be a > singl

Re: RFR: 6983726: Reimplement MethodHandleProxies.asInterfaceInstance [v11]

2023-05-01 Thread John R Rose
On Mon, 1 May 2023 21:37:07 GMT, Johannes Kuhn wrote: > `assertOriginalLookupOf` Yes, that’s the sort of thing I’d expect. It could go into a `jdk.internal.reflect` class. Now that we have modules, JDK platform code can use public APIs not accessible to normal users. Also, the static helper

Re: RFR: 8303796: Optionally build fully statically linked JDK image

2023-05-01 Thread Jiangli Zhou
On Sun, 30 Apr 2023 18:34:12 GMT, Alan Bateman wrote: > > The build is already capable of producing .a files and this patch is > > building on top of that build feature. The current .a file creation is used > > by the downstream graal build which needs it for nativeimage. > > Also builds on re

Re: RFR: 8303796: Optionally build fully statically linked JDK image

2023-05-01 Thread Jiangli Zhou
On Mon, 1 May 2023 14:03:10 GMT, Erik Joelsson wrote: > > Based on the above finding, I pushed a change to use $(JVM_LIBS) for the > > linking command. @erikj79 could you please see if that resolves the clock_* > > symbol issues in your environment? > > Yes, it built cleanly with that change.

Re: RFR: 6983726: Reimplement MethodHandleProxies.asInterfaceInstance [v11]

2023-05-01 Thread Johannes Kuhn
On Mon, 1 May 2023 21:00:40 GMT, John R Rose wrote: >> Chen Liang 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 24 additional >> commits since

Re: RFR: 8159337: Introduce a method in Locale class to return the language tags as per RFC 5646 convention [v2]

2023-05-01 Thread Justin Lu
> Please review this PR which adds the method `caseFoldLanguageTag(String > languageTag)` to java.util.Locale. > > This method case folds a language tag to adhere to _[section 2.1.1. > Formatting of Language Tags of > RFC5646](https://www.rfc-editor.org/rfc/rfc5646.html#section-2.1)_. This > f

Re: RFR: 6983726: Reimplement MethodHandleProxies.asInterfaceInstance [v11]

2023-05-01 Thread John R Rose
On Mon, 1 May 2023 14:56:27 GMT, Chen Liang wrote: >> As John Rose has pointed out in this issue, the current j.l.r.Proxy based >> implementation of MethodHandleProxies.asInterface has a few issues: >> 1. Exposes too much information via Proxy supertype (and WrapperInstance >> interface) >> 2.

RFR: 8307164: TestSegmentCopy times out (mainline)

2023-05-01 Thread Jorn Vernee
Port of: https://github.com/openjdk/panama-foreign/pull/827 - Commit messages: - 8303831: TestSegmentCopy times out Changes: https://git.openjdk.org/jdk/pull/13741/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=13741&range=00 Issue: https://bugs.openjdk.org/browse/JDK-830

Integrated: 8300818: Reduce complexity of padding with DateTimeFormatter

2023-05-01 Thread Sergey Tsypanov
On Sat, 21 Jan 2023 21:01:48 GMT, Sergey Tsypanov wrote: > Currently it's O(n) - we do `n` shifts of bytes within `StringBuilder`. This > can be reduced to O(1) improving the code like: > > DateTimeFormatter dtf = new DateTimeFormatterBuilder() > .appendLiteral("Date:") > .padNext(20, ' ')

Re: RFR: 8303530: Add system property for custom JAXP configuration file [v9]

2023-05-01 Thread Naoto Sato
On Fri, 28 Apr 2023 05:47:24 GMT, Joe Wang wrote: >> Add a system property, jdk.xml.config.file, to return the path to a custom >> JAXP configuration file. The current configuration file, jaxp.properties, >> that the JDK supports will become the default configuration file. >> >> CSR: https://b

Re: RFR: 8304888: Add dedicated VMProps for linker and fallback linker [v4]

2023-05-01 Thread Alan Bateman
On Mon, 1 May 2023 16:48:30 GMT, Jorn Vernee wrote: >> This patch adds a dedicated jtreg property to check which CABI is being used >> by the JDK, which can be used both to check whether the foreign linker is >> supported, and whether the fallback linker is being used. (and, possibly it >> can

Integrated: 8306678: Replace use of os.version with an internal Version record

2023-05-01 Thread Roger Riggs
On Fri, 21 Apr 2023 16:44:13 GMT, Roger Riggs wrote: > Create an internal Version record to hold and compare versions of the form > (major, minor, micro). > Add `OperatingSystem.version()` to return the version of the running OS. > Replace uses of os.version in java.base. > Subsequent PRs will a

a plea for blocking peek

2023-05-01 Thread mark.yagnatinsky
I'm not sure if this I'm breaking etiquette for this list but I'm going to risk resending my first message because it got zero replies. If it was simply too long, please let me know and I'll attempt a shorter version. Here's like to original: https://mail.openjdk.org/pipermail/core-libs-dev/202

Re: RFR: 8304888: Add dedicated VMProps for linker and fallback linker [v3]

2023-05-01 Thread Jorn Vernee
On Fri, 28 Apr 2023 12:59:26 GMT, Jorn Vernee wrote: >> This patch adds a dedicated jtreg property to check which CABI is being used >> by the JDK, which can be used both to check whether the foreign linker is >> supported, and whether the fallback linker is being used. (and, possibly it >> ca

RFR: 8307163: JLONG_FORMAT_SPECIFIER should be updated on Windows

2023-05-01 Thread Julian Waters
Windows no longer uses I64d anywhere in their newer compilers, instead using the conforming lld specifiers. Minor cleanup here in JLI code to reflect that - Commit messages: - JLONG_FORMAT_SPECIFIER should be updated on Windows Changes: https://git.openjdk.org/jdk/pull/13740/files

Re: RFR: 8304888: Add dedicated VMProps for linker and fallback linker [v4]

2023-05-01 Thread Jorn Vernee
> This patch adds a dedicated jtreg property to check which CABI is being used > by the JDK, which can be used both to check whether the foreign linker is > supported, and whether the fallback linker is being used. (and, possibly it > can also be use to check for a particular ABI in case we want

Re: RFR: 8306678: Replace use of os.version with an internal Version record [v5]

2023-05-01 Thread Roger Riggs
> Create an internal Version record to hold and compare versions of the form > (major, minor, micro). > Add `OperatingSystem.version()` to return the version of the running OS. > Replace uses of os.version in java.base. > Subsequent PRs will apply to uses in other modules including, jdk.jlink, >

Re: RFR: 8302496: Runtime.exit incorrectly says it never throws an exception

2023-05-01 Thread Stuart Marks
On Mon, 1 May 2023 05:33:00 GMT, Alan Bateman wrote: >> Yeah I had some misgivings mentioning the SM first, but if it's not >> mentioned, then the assertions in the rest of the text become hedged and >> uncertain. The SM, checkExit, and whether the exit value is allowed all have >> to be menti

Re: RFR: 8306678: Replace use of os.version with an internal Version record [v4]

2023-05-01 Thread Roger Riggs
> Create an internal Version record to hold and compare versions of the form > (major, minor, micro). > Add `OperatingSystem.version()` to return the version of the running OS. > Replace uses of os.version in java.base. > Subsequent PRs will apply to uses in other modules including, jdk.jlink, >

Integrated: 8304915: Create jdk.internal.util.Architecture enum and apply

2023-05-01 Thread Roger Riggs
On Wed, 5 Apr 2023 15:58:08 GMT, Roger Riggs wrote: > Define an internal jdk.internal.util.Architecture enumeration and static > methods to replace uses of the system property `os.arch`. > The enumeration values are defined to match those used in the build. > The initial values are: `X64, X86, A

Re: RFR: 6983726: Reimplement MethodHandleProxies.asInterfaceInstance [v11]

2023-05-01 Thread Chen Liang
> As John Rose has pointed out in this issue, the current j.l.r.Proxy based > implementation of MethodHandleProxies.asInterface has a few issues: > 1. Exposes too much information via Proxy supertype (and WrapperInstance > interface) > 2. Does not allow future expansion to support SAM[^1] abstrac

Integrated: 8305201: Improve error message for GroupLayouts that are too large on SysV

2023-05-01 Thread Jorn Vernee
On Fri, 21 Apr 2023 14:25:26 GMT, Jorn Vernee wrote: > Using for instance a struct layout that contains an unbounded array will > produce the exception from the JBS issue. > > This patch checks for the case where a GroupLayout is too large more > explicitly, and reports the issue using a more

Re: RFR: 8303796: Optionally build fully statically linked JDK image

2023-05-01 Thread Erik Joelsson
On Fri, 28 Apr 2023 23:25:17 GMT, Erik Joelsson wrote: >>> I pulled this PR and had a go at building it. For me it failed with errors >>> like this: >>> >>> ``` >>> /home/erik/git/jdk/build/linux-x64/images/static-libs/lib/libjvm.a(os_linux.o):os_linux.cpp:function >>> os::Linux::fast_thread_c

Re: RFR: 8305201: Improve error message for GroupLayouts that are too large on SysV [v4]

2023-05-01 Thread Jorn Vernee
> Using for instance a struct layout that contains an unbounded array will > produce the exception from the JBS issue. > > This patch checks for the case where a GroupLayout is too large more > explicitly, and reports the issue using a more informative exception. Jorn Vernee has updated the pul

Integrated: 8305093: Linker cache should not take layout names into account

2023-05-01 Thread Jorn Vernee
On Thu, 20 Apr 2023 17:23:08 GMT, Jorn Vernee wrote: > Strip names from the function descriptors used in linkage requests. The names > are not important for classification, and this will allow the cached > MethodHandle/UpcallStubFactory to be shared across linkage request with the > same struc

Re: RFR: 8305093: Linker cache should not take layout names into account [v5]

2023-05-01 Thread Jorn Vernee
> Strip names from the function descriptors used in linkage requests. The names > are not important for classification, and this will allow the cached > MethodHandle/UpcallStubFactory to be shared across linkage request with the > same structure, but with layouts that have different names. > >

Integrated: 8301703: java.base jdk.internal.foreign.abi.BindingSpecializer uses ASM to generate classes

2023-05-01 Thread Jorn Vernee
On Thu, 30 Mar 2023 17:11:44 GMT, Jorn Vernee wrote: > Rewrite BindingSpecializer to use the new class file API. > > Note: There is a big try/catch/finally block generated in the `specialize` > method that currently uses labels. I looked at replacing this with a call to > `CodeBuilder::trying`

Integrated: 8303002: Reject packed structs from linker

2023-05-01 Thread Jorn Vernee
On Thu, 23 Mar 2023 18:11:18 GMT, Jorn Vernee wrote: > This patch adds checks in AbstractLinker to reject packed structs and structs > with excess padding (e.g. unnamed bitfields), since both of those are > currently not supported, and the ABI/spec seems too vague to base support on. This pull

Re: RFR: JDK-8306112 Implementation of JEP 445: Flexible Main Methods and Anonymous Main Classes (Preview) [v8]

2023-05-01 Thread Jim Laskey
> Add flexible main methods and anonymous main classes to the Java language. Jim Laskey has updated the pull request incrementally with two additional commits since the last revision: - Anonymous main classes renamed to unnamed classes - Add test - Changes: - all: https://git.o

Re: RFR: JDK-8306112 Implementation of JEP 445: Flexible Main Methods and Anonymous Main Classes (Preview) [v2]

2023-05-01 Thread Jim Laskey
On Thu, 27 Apr 2023 18:00:38 GMT, Jim Laskey wrote: >> src/java.base/share/native/libjli/java.c line 590: >> >>> 588: CHECK_EXCEPTION_NULL_LEAVE(mainID); >>> 589: (*env)->CallVoidMethod(env, mainObject, mainID); >>> 590: break; >> >> This calls into LauncherHelper to get

Re: RFR: 8306455: Wrong majorVersion for multiple attributes in Classfile API

2023-05-01 Thread Chen Liang
On Wed, 19 Apr 2023 14:31:36 GMT, Chen Liang wrote: > Spotted the typo for BootstrapMethods, and another review over the API > exposed the typo on PermittedSubclasses. @asotona Would you mind reviewing this? - PR Comment: https://git.openjdk.org/jdk/pull/13536#issuecomment-1529491