Re: RFR: 8349787: java/lang/Thread/virtual/ThreadPollOnYield.java#default passes unexpectedly without libVThreadPinner.so [v3]

2025-02-11 Thread SendaoYan
> Hi all, > > Test test/jdk/java/lang/Thread/virtual/ThreadPollOnYield.java run passed > unexpected without native library or with the incorrect native library path. > The test command with incorrect native library path shows below. We will seen > this tests run passed unexpected before this PR

Re: RFR: 8349787: java/lang/Thread/virtual/ThreadPollOnYield.java#default passes unexpectedly without libVThreadPinner.so [v3]

2025-02-11 Thread SendaoYan
On Wed, 12 Feb 2025 07:15:58 GMT, Alan Bateman wrote: >> SendaoYan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Rename latch to started, and do the countDown before the while loop > > test/jdk/java/lang/Thread/virtual/ThreadPollOnYiel

Re: RFR: 8349145: Make Class.getProtectionDomain() non-native [v7]

2025-02-11 Thread Alan Bateman
On Mon, 10 Feb 2025 13:23:49 GMT, Coleen Phillimore wrote: >> This change removes the native call and injected field for ProtectionDomain >> in the java.lang.Class instance, and moves the field to be declared in Java. >> Tested with tier1-4. > > Coleen Phillimore has updated the pull request wit

Re: RFR: 8349787: Test ThreadPollOnYield.java#default passed unexpected without native library [v2]

2025-02-11 Thread SendaoYan
> Hi all, > > Test test/jdk/java/lang/Thread/virtual/ThreadPollOnYield.java run passed > unexpected without native library or with the incorrect native library path. > The test command with incorrect native library path shows below. We will seen > this tests run passed unexpected before this PR

Re: RFR: 8349787: Test ThreadPollOnYield.java#default passed unexpected without native library

2025-02-11 Thread Alan Bateman
On Wed, 12 Feb 2025 03:24:07 GMT, SendaoYan wrote: > Hi all, > > Test test/jdk/java/lang/Thread/virtual/ThreadPollOnYield.java run passed > unexpected without native library or with the incorrect native library path. > The test command with incorrect native library path shows below. We will se

Re: RFR: 8349145: Make Class.getProtectionDomain() non-native [v7]

2025-02-11 Thread David Holmes
On Mon, 10 Feb 2025 13:23:49 GMT, Coleen Phillimore wrote: >> This change removes the native call and injected field for ProtectionDomain >> in the java.lang.Class instance, and moves the field to be declared in Java. >> Tested with tier1-4. > > Coleen Phillimore has updated the pull request wit

Re: Integrated: 8349874: Missing comma in copyright from JDK-8349689

2025-02-11 Thread SendaoYan
On Wed, 12 Feb 2025 03:53:47 GMT, David Holmes wrote: > Trivial fix for missing comma. > > Thanks Thanks David. Apologize for mine carelessness. - PR Comment: https://git.openjdk.org/jdk/pull/23577#issuecomment-2652752680

Re: RFR: 8349689: Several virtual thread tests missing /native keyword [v5]

2025-02-11 Thread SendaoYan
On Wed, 12 Feb 2025 03:43:53 GMT, David Holmes wrote: >> SendaoYan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Remove the additional check for virtual thread of >> test/jdk/java/lang/Thread/virtual/ThreadPollOnYield.java > > test/jd

Re: RFR: 8349689: Several virtual thread tests missing /native keyword [v5]

2025-02-11 Thread David Holmes
On Tue, 11 Feb 2025 09:03:24 GMT, SendaoYan wrote: >> H all, >> >> This PR add `/native` keyword in the test header for virtual thread tests. >> The `/native` keyword will make run the related tests by jtreg standalone >> more friendly. >> >> I runed all the tests without -nativepath argument

RFR: 8349787: Test ThreadPollOnYield.java#default passed unexpected without native library

2025-02-11 Thread SendaoYan
Hi all, Test test/jdk/java/lang/Thread/virtual/ThreadPollOnYield.java run passed unexpected without native library or with the incorrect native library path. The test command with incorrect native library path shows below. We will seen this tests run passed unexpected before this PR, because th

Integrated: 8349689: Several virtual thread tests missing /native keyword

2025-02-11 Thread SendaoYan
On Tue, 11 Feb 2025 02:45:11 GMT, SendaoYan wrote: > H all, > > This PR add `/native` keyword in the test header for virtual thread tests. > The `/native` keyword will make run the related tests by jtreg standalone > more friendly. > > I runed all the tests without -nativepath argument and fi

Re: RFR: 8349689: Several virtual thread tests missing /native keyword [v5]

2025-02-11 Thread SendaoYan
On Tue, 11 Feb 2025 09:03:24 GMT, SendaoYan wrote: >> H all, >> >> This PR add `/native` keyword in the test header for virtual thread tests. >> The `/native` keyword will make run the related tests by jtreg standalone >> more friendly. >> >> I runed all the tests without -nativepath argument

Re: RFR: 8349689: Several virtual thread tests missing /native keyword [v5]

2025-02-11 Thread Leonid Mesnik
On Tue, 11 Feb 2025 09:03:24 GMT, SendaoYan wrote: >> H all, >> >> This PR add `/native` keyword in the test header for virtual thread tests. >> The `/native` keyword will make run the related tests by jtreg standalone >> more friendly. >> >> I runed all the tests without -nativepath argument

Re: RFR: 8349145: Make Class.getProtectionDomain() non-native [v7]

2025-02-11 Thread Chen Liang
On Mon, 10 Feb 2025 13:23:49 GMT, Coleen Phillimore wrote: >> This change removes the native call and injected field for ProtectionDomain >> in the java.lang.Class instance, and moves the field to be declared in Java. >> Tested with tier1-4. > > Coleen Phillimore has updated the pull request wit

Re: RFR: 8349759: Fix CertificateBuilder and SimpleOCSPServer test utilities to support PQC algorithms

2025-02-11 Thread Jamil Nimeh
On Tue, 11 Feb 2025 17:50:45 GMT, Jamil Nimeh wrote: > This fix makes some minor changes to the internals of the > `CertificateBuilder` and `SimpleOCSPServer` test classes. They would break > when ML-DSA was selected as key and signing algorithms. Also RSASSA-PSS > works better now with thes

Re: RFR: 8349759: Fix CertificateBuilder and SimpleOCSPServer test utilities to support PQC algorithms

2025-02-11 Thread Bernd
On Tue, 11 Feb 2025 17:50:45 GMT, Jamil Nimeh wrote: > This fix makes some minor changes to the internals of the > `CertificateBuilder` and `SimpleOCSPServer` test classes. They would break > when ML-DSA was selected as key and signing algorithms. Also RSASSA-PSS > works better now with thes

Re: RFR: 8344802: Crash in StubRoutines::verify_mxcsr with -XX:+EnableX86ECoreOpts and -Xcheck:jni [v6]

2025-02-11 Thread Sandhya Viswanathan
On Tue, 11 Feb 2025 21:47:31 GMT, Volodymyr Paprotski wrote: >> (Also see `8319429: Resetting MXCSR flags degrades ecore`) >> >> This PR fixes two issues: >> - the original issue is a crash caused by `__ warn` corrupting the stack on >> Windows only >> - This issue also uncovered that -Xcheck:

Re: RFR: 8344802: Crash in StubRoutines::verify_mxcsr with -XX:+EnableX86ECoreOpts and -Xcheck:jni [v6]

2025-02-11 Thread Volodymyr Paprotski
> (Also see `8319429: Resetting MXCSR flags degrades ecore`) > > This PR fixes two issues: > - the original issue is a crash caused by `__ warn` corrupting the stack on > Windows only > - This issue also uncovered that -Xcheck:jni test cases were getting 65k > lines of warning on HelloWorld (on

Integrated: 8150442: Enforce Supported Platforms in Packager for MSI bundles

2025-02-11 Thread Alexey Semenyuk
On Wed, 5 Feb 2025 20:11:36 GMT, Alexey Semenyuk wrote: > Enable MSI installers to block installation if the version of Windows is too > old. > > jpackage will read major and minor OS versions from PE headers of the main > launcher and `java.dll` in the app image. The combined version is the m

RFR: 8349716: IllegalAccessError when Proxy methods return object of a package-private type

2025-02-11 Thread Chen Liang
The return value adaption of Proxy is problematic, that it may attempt to access package-private types inaccessible to its package in a `checkcast` instruction, which causes `IllegalAccessError` if the returned object is not `null`. This likely affects all Java versions since the publication of

RFR: 8349759: Fix CertificateBuilder and SimpleOCSPServer test utilities to support PQC algorithms

2025-02-11 Thread Jamil Nimeh
This fix makes some minor changes to the internals of the `CertificateBuilder` and `SimpleOCSPServer` test classes. They would break when ML-DSA was selected as key and signing algorithms. Also RSASSA-PSS works better now with these changes. I've also taken this opportunity to do some cleanup

Re: RFR: 8349254: Disable "best-fit" mapping on Windows environment variables [v3]

2025-02-11 Thread Naoto Sato
On Fri, 7 Feb 2025 20:05:49 GMT, Naoto Sato wrote: >> This is a follow-on fix to >> [JDK-8337506](https://bugs.openjdk.org/browse/JDK-8337506). The Java >> launcher can take arguments from "JDK_JAVA_OPTIONS" environment variable, so >> the same processing is needed. Also, obsolete code for Win

Integrated: 8349254: Disable "best-fit" mapping on Windows environment variables

2025-02-11 Thread Naoto Sato
On Thu, 6 Feb 2025 19:46:21 GMT, Naoto Sato wrote: > This is a follow-on fix to > [JDK-8337506](https://bugs.openjdk.org/browse/JDK-8337506). The Java launcher > can take arguments from "JDK_JAVA_OPTIONS" environment variable, so the same > processing is needed. Also, obsolete code for Windows

Re: RFR: 8342206: Convenience method to check if a constant pool entry matches nominal descriptors

2025-02-11 Thread Adam Sotona
On Tue, 11 Feb 2025 16:36:24 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/lang/classfile/constantpool/Utf8Entry.java >> line 95: >> >>> 93: * @since 25 >>> 94: */ >>> 95: boolean equalsSymbol(ClassDesc desc); >> >> Ambiguity of class internal name vs. descriptor ser

Re: RFR: 8342206: Convenience method to check if a constant pool entry matches nominal descriptors

2025-02-11 Thread Chen Liang
On Tue, 11 Feb 2025 08:03:23 GMT, Adam Sotona wrote: >> The ClassFile API promotes usage of constant nominal descriptors over >> literal strings. However, for `class` file parsing, currently the efficient >> way to check if a constant pool entry matches a desired descriptor is via >> unrolling

Integrated: 8349624: Validation for slot missing in CodeBuilder local variable instructions

2025-02-11 Thread Chen Liang
On Fri, 7 Feb 2025 19:40:44 GMT, Chen Liang wrote: > In CodeBuilder, validation for a slot was missing due to concurrent patches, > and the original patch did not add effective tests for CodeBuilder because of > the complex exceptional behaviors. Now the bug is fixed with renames to > prevent

Re: RFR: 8349624: Validation for slot missing in CodeBuilder local variable instructions

2025-02-11 Thread Chen Liang
On Fri, 7 Feb 2025 19:40:44 GMT, Chen Liang wrote: > In CodeBuilder, validation for a slot was missing due to concurrent patches, > and the original patch did not add effective tests for CodeBuilder because of > the complex exceptional behaviors. Now the bug is fixed with renames to > prevent

Re: RFR: 8347408: Create an internal method handle adapter for system calls with errno [v5]

2025-02-11 Thread Per Minborg
> Going forward, converting older JDK code to use the relatively new FFM API > requires system calls that can provide `errno` and the likes to explicitly > allocate a `MemorySegment` to capture potential error states. This can lead > to negative performance implications if not designed carefully

Re: RFR: 8349648: Test tools/jpackage/share/JLinkOptionsTest.java fails with --enable-linkable-runtime set after JDK-8346434 [v2]

2025-02-11 Thread Christoph Langer
On Fri, 7 Feb 2025 17:43:15 GMT, Alexey Semenyuk wrote: >> As far as my testing is concerned it's only `jdk.crypto.cryptoki` which is >> different with `--bind-services` (as it provides a security provider as a >> service and doesn't export API). > > This is the diff of modules between "jpackag

Re: RFR: 8349648: Test tools/jpackage/share/JLinkOptionsTest.java fails with --enable-linkable-runtime set after JDK-8346434 [v2]

2025-02-11 Thread Christoph Langer
> The change for JDK-8346434 added a new test case to > tools/jpackage/share/JLinkOptionsTest.java which does not respect the > constraint of the linkable runtime (JEP 493) that no jdk.jlink module can be > part of the target image. > This can be circumvented by limiting the modules. Christoph

Re: RFR: 8349689: Several virtual thread tests missing /native keyword [v5]

2025-02-11 Thread Alan Bateman
On Tue, 11 Feb 2025 09:03:24 GMT, SendaoYan wrote: >> H all, >> >> This PR add `/native` keyword in the test header for virtual thread tests. >> The `/native` keyword will make run the related tests by jtreg standalone >> more friendly. >> >> I runed all the tests without -nativepath argument

Re: RFR: 8349689: Several virtual thread tests missing /native keyword [v5]

2025-02-11 Thread SendaoYan
On Tue, 11 Feb 2025 09:03:24 GMT, SendaoYan wrote: >> H all, >> >> This PR add `/native` keyword in the test header for virtual thread tests. >> The `/native` keyword will make run the related tests by jtreg standalone >> more friendly. >> >> I runed all the tests without -nativepath argument

Re: RFR: 8349689: Several virtual thread tests missing /native keyword [v3]

2025-02-11 Thread SendaoYan
On Tue, 11 Feb 2025 09:00:46 GMT, SendaoYan wrote: >> Can you remove this change from the PR as it this is a separate discussion? >> My guess is that in your environment the Thread.yield is somehow taking more >> than 5 seconds, is that right? In that case, we can modify the test to use a >> l

Re: RFR: 8349689: Several virtual thread tests missing /native keyword [v3]

2025-02-11 Thread SendaoYan
On Tue, 11 Feb 2025 08:53:41 GMT, Alan Bateman wrote: >> Reason description as >> https://github.com/openjdk/jdk/pull/23550#issuecomment-2650141187. > > Can you remove this change from the PR as it this is a separate discussion? > My guess is that in your environment the Thread.yield is somehow

Re: RFR: 8349689: Several virtual thread tests missing /native keyword [v5]

2025-02-11 Thread SendaoYan
> H all, > > This PR add `/native` keyword in the test header for virtual thread tests. > The `/native` keyword will make run the related tests by jtreg standalone > more friendly. > > I runed all the tests without -nativepath argument and find the fail tests. > This will find all the virtual

Re: RFR: 8349689: Several virtual thread tests missing /native keyword [v3]

2025-02-11 Thread Alan Bateman
On Tue, 11 Feb 2025 08:44:15 GMT, SendaoYan wrote: >> test/jdk/java/lang/Thread/virtual/ThreadPollOnYield.java line 69: >> >>> 67: if (flag != true) { >>> 68: throw new RuntimeException("flag = " + flag); >>> 69: } >> >> What are these other changes about? > > Reason

Re: RFR: 8349689: Several virtual thread tests missing /native keyword [v3]

2025-02-11 Thread SendaoYan
On Tue, 11 Feb 2025 08:44:15 GMT, Alan Bateman wrote: >> SendaoYan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> add /native for test/jdk/java/lang/Thread/virtual/ThreadPollOnYield.java >> test/jdk/java/lang/Thread/virtual/Starvation.

Re: RFR: 8349689: Several virtual thread tests missing /native keyword [v4]

2025-02-11 Thread SendaoYan
> H all, > > This PR add `/native` keyword in the test header for virtual thread tests. > The `/native` keyword will make run the related tests by jtreg standalone > more friendly. > > I runed all the tests without -nativepath argument and find the fail tests. > This will find all the virtual

Re: RFR: 8349689: Several virtual thread tests missing /native keyword [v3]

2025-02-11 Thread SendaoYan
On Tue, 11 Feb 2025 08:41:44 GMT, Alan Bateman wrote: >> SendaoYan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> add /native for test/jdk/java/lang/Thread/virtual/ThreadPollOnYield.java >> test/jdk/java/lang/Thread/virtual/Starvation.

Re: RFR: 8349689: Several virtual thread tests missing /native keyword [v3]

2025-02-11 Thread Alan Bateman
On Tue, 11 Feb 2025 08:38:48 GMT, SendaoYan wrote: >> H all, >> >> This PR add `/native` keyword in the test header for virtual thread tests. >> The `/native` keyword will make run the related tests by jtreg standalone >> more friendly. >> >> I runed all the tests without -nativepath argument

Re: RFR: 8349689: Several virtual thread tests missing /native keyword

2025-02-11 Thread SendaoYan
On Tue, 11 Feb 2025 07:30:49 GMT, Alan Bateman wrote: > Can you check if these two needs to be updated too? > > test/jdk/java/lang/Thread/virtual/ThreadPollOnYield.java > test/jdk/java/lang/Thread/virtual/Starvation.java These two tests also need `/native` keyword. - Test test/jdk/java/lang/T

Re: RFR: 8347491: IllegalArgumentationException thrown by ThreadPoolExecutor doesn't have a useful message

2025-02-11 Thread Per Minborg
On Sat, 11 Jan 2025 07:10:53 GMT, He-Pin(kerr) wrote: > Motivation: > When a user passes a wrong parameter, the current implementation throws an > IllegalArgumentException with an error message `null`, which is not helpful. > > Modification: > Add detail error messages. > > Result: > Helpful m

Re: RFR: 8349689: Several virtual thread tests missing /native keyword [v3]

2025-02-11 Thread SendaoYan
> H all, > > This PR add `/native` keyword in the test header for virtual thread tests. > The `/native` keyword will make run the related tests by jtreg standalone > more friendly. > > I runed all the tests without -nativepath argument and find the fail tests. > This will find all the virtual

Re: RFR: 8349620: Add VMProps for static JDK

2025-02-11 Thread Alan Bateman
On Mon, 10 Feb 2025 08:21:21 GMT, Alan Bateman wrote: >> Please review this change that adds the `jdk.static` VMProps. It can be used >> to skip tests not for running on static JDK. >> >> This also adds a new WhiteBox native method, >> `jdk.test.whitebox.WhiteBox.isStatic()`, which is used by

Re: RFR: 8342206: Convenience method to check if a constant pool entry matches nominal descriptors

2025-02-11 Thread Adam Sotona
On Tue, 11 Feb 2025 02:26:57 GMT, Chen Liang wrote: > The ClassFile API promotes usage of constant nominal descriptors over literal > strings. However, for `class` file parsing, currently the efficient way to > check if a constant pool entry matches a desired descriptor is via unrolling > them