Re: RFR: 8308286 Fix clang warnings in linux code [v6]

2023-06-22 Thread Daniel Jeliński
On Thu, 22 Jun 2023 09:58:19 GMT, Daniel Jeliński wrote: >> Artem Semenov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> update > > make/modules/java.desktop/lib/Awt2dLibraries.gmk line 241: > >> 239: DISABLED_WARNINGS_

Re: RFR: 8305341: Alignment should be enforced by alignas instead of compiler specific attributes [v5]

2023-06-22 Thread Daniel Jeliński
On Fri, 23 Jun 2023 02:25:47 GMT, Julian Waters wrote: >> Julian Waters has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Whitespace >> - Revert >> - _MSC_VER > > @djelinski Sorry for the tag, it's just that this PR has been collecti

Re: RFR: 8310628: GcInfoBuilder.c missing JNI Exception checks

2023-06-22 Thread David Holmes
On Thu, 22 Jun 2023 10:10:07 GMT, Kevin Walls wrote: > JNI calls were identified, where we do not check for a pending Exception > afterwards. > > (JDK-8162530 cleaned up up some of these kind of issues some years back, but > more were found.) > > I tested a code change to manually create an E

Re: RFR: 8305341: Alignment should be enforced by alignas instead of compiler specific attributes [v6]

2023-06-22 Thread Julian Waters
> C11 has been stable for a long time on all platforms, so native code can use > the standard alignas operator for alignment requirements Julian Waters has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 18 commits: - Merge branch 'open

Re: RFR: 8305341: Alignment should be enforced by alignas instead of compiler specific attributes [v5]

2023-06-22 Thread Julian Waters
On Tue, 20 Jun 2023 07:20:12 GMT, Julian Waters wrote: >> C11 has been stable for a long time on all platforms, so native code can use >> the standard alignas operator for alignment requirements > > Julian Waters has updated the pull request incrementally with three > additional commits since t

RFR: JDK-8310066: Improve test coverage for JVMTI GetThreadState on carrier and mounted vthread

2023-06-22 Thread Alex Menkov
This is follow-up JDK-8307153/JDK-8309612 (JVMTI GetThreadState on carrier should return STATE_WAITING) New test tests GetThreadState for different thread states. The test detected a bug in the implementation, new issue is created: JDK-8310584 Corresponding testcases are commented now in the test,

Re: RFR: 8310628: GcInfoBuilder.c missing JNI Exception checks

2023-06-22 Thread Kevin Walls
On Thu, 22 Jun 2023 18:14:48 GMT, Mandy Chung wrote: > Looks fine. It may worth refactoring the code to set an element in an utility > method. > > ``` > jobject obj = JNU_NewObjectByName(env, class_name, signature, value); > if ((*env)->ExceptionCheck(env)) { > return; > } >

Re: RFR: 8310628: GcInfoBuilder.c missing JNI Exception checks

2023-06-22 Thread Mandy Chung
On Thu, 22 Jun 2023 10:10:07 GMT, Kevin Walls wrote: > JNI calls were identified, where we do not check for a pending Exception > afterwards. > > (JDK-8162530 cleaned up up some of these kind of issues some years back, but > more were found.) > > I tested a code change to manually create an E

Re: RFR: 8308286 Fix clang warnings in linux code [v6]

2023-06-22 Thread Artem Semenov
On Thu, 22 Jun 2023 09:58:49 GMT, Daniel Jeliński wrote: >> Artem Semenov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> update > > make/modules/java.desktop/lib/Awt2dLibraries.gmk line 260: > >> 258: DISABLED_WARNINGS_clang_ai

Re: RFR: 8308286 Fix clang warnings in linux code [v7]

2023-06-22 Thread Artem Semenov
> When using the clang compiler to build OpenJDk on Linux, we encounter various > "warnings as errors". > They can be fixed with small changes. Artem Semenov has updated the pull request incrementally with one additional commit since the last revision: update - Changes: - all:

Re: RFR: 8309979: BootstrapMethods attribute is missing in class files recreated by SA [v2]

2023-06-22 Thread Ashutosh Mehra
On Thu, 22 Jun 2023 03:21:33 GMT, Serguei Spitsyn wrote: > Do we have any automatic test coverage for this? Nope, I don't think there is any test for BootstrapMethods. As mentioned [here](https://github.com/openjdk/jdk/pull/14556#issuecomment-1601946451) the existing tests - ClhsdbDumpclass.ja

Re: RFR: 8309979: BootstrapMethods attribute is missing in class files recreated by SA [v3]

2023-06-22 Thread Ashutosh Mehra
> Please review this PR that extends SA to write BootstrapMethods attribute > when dumping the class files. > > Tested it by dumping the class file for java/lang/String and comparing the > BootstrapMethods attribute shown by javap for the original and the dumped > class. Ashutosh Mehra has upd

Re: RFR: JDK-8310550: Adjust references to rt.jar

2023-06-22 Thread Alan Bateman
On Wed, 21 Jun 2023 15:18:19 GMT, Matthias Baesken wrote: > There are a few references to rt.jar in comments and in the codebase itself. > Some of them might be removed or adjusted. src/java.sql/share/classes/java/sql/DriverManager.java line 658: > 656: * (which is invoking this class

Re: RFR: 8242152: SA does not include StackMapTables when dumping .class files [v3]

2023-06-22 Thread Daohan Qu
On Thu, 22 Jun 2023 13:44:53 GMT, Daniel D. Daugherty wrote: >> Daohan Qu has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add a simple check > > Folks the GHA for this PR reported a failure in > serviceability/sa/ClhsdbDumpclass > on w

Re: RFR: 8242152: SA does not include StackMapTables when dumping .class files [v3]

2023-06-22 Thread Daniel D . Daugherty
On Thu, 22 Jun 2023 04:00:14 GMT, Daohan Qu wrote: >> This patch adds `StackMapTable` for the class files generated by `clhsdb`'s >> `buildreplayjars` command. This bug manifests itself during my diagnosing >> [JDK-8309751](https://bugs.openjdk.org/browse/JDK-8309751) and needs to be >> fixed

Re: RFR: 8310618: Test serviceability/sa/ClhsdbDumpclass.java fails after 8242152: 'StackMapTable:' missing from stdout/stderr

2023-06-22 Thread Kevin Walls
On Thu, 22 Jun 2023 09:17:46 GMT, Daohan Qu wrote: > This patch should fix > [JDK-8310618](https://bugs.openjdk.org/browse/JDK-8310618). It attempts to > correct my errors in fixing > [JDK-8242152](https://bugs.openjdk.org/browse/JDK-8242152). Right, the langtools 32-bit failure does not rela

Integrated: 8310618: Test serviceability/sa/ClhsdbDumpclass.java fails after 8242152: 'StackMapTable:' missing from stdout/stderr

2023-06-22 Thread Daohan Qu
On Thu, 22 Jun 2023 09:17:46 GMT, Daohan Qu wrote: > This patch should fix > [JDK-8310618](https://bugs.openjdk.org/browse/JDK-8310618). It attempts to > correct my errors in fixing > [JDK-8242152](https://bugs.openjdk.org/browse/JDK-8242152). This pull request has now been integrated. Chang

Re: RFR: 8310618: Test serviceability/sa/ClhsdbDumpclass.java fails after 8242152: 'StackMapTable:' missing from stdout/stderr

2023-06-22 Thread Daohan Qu
On Thu, 22 Jun 2023 09:17:46 GMT, Daohan Qu wrote: > This patch should fix > [JDK-8310618](https://bugs.openjdk.org/browse/JDK-8310618). It attempts to > correct my errors in fixing > [JDK-8242152](https://bugs.openjdk.org/browse/JDK-8242152). The failure in GHA on `linux-x86` is in `test/la

Re: RFR: 8310618: Test serviceability/sa/ClhsdbDumpclass.java fails after 8242152: 'StackMapTable:' missing from stdout/stderr

2023-06-22 Thread Daohan Qu
On Thu, 22 Jun 2023 09:37:40 GMT, Kevin Walls wrote: >> This patch should fix >> [JDK-8310618](https://bugs.openjdk.org/browse/JDK-8310618). It attempts to >> correct my errors in fixing >> [JDK-8242152](https://bugs.openjdk.org/browse/JDK-8242152). > > Yes, looks good. 8-) Thanks a lot for y

Re: RFR: 8310618: Test serviceability/sa/ClhsdbDumpclass.java fails after 8242152: 'StackMapTable:' missing from stdout/stderr

2023-06-22 Thread David Holmes
On Thu, 22 Jun 2023 09:17:46 GMT, Daohan Qu wrote: > This patch should fix > [JDK-8310618](https://bugs.openjdk.org/browse/JDK-8310618). It attempts to > correct my errors in fixing > [JDK-8242152](https://bugs.openjdk.org/browse/JDK-8242152). Okay. Not sure how this ever passed without this

Re: RFR: JDK-8310380: Handle problems in core-related tests on macOS when codesign tool does not work [v3]

2023-06-22 Thread Christoph Langer
On Thu, 22 Jun 2023 11:51:15 GMT, Matthias Baesken wrote: >> Currently, a number of tests fail on macOS because they miss the core file >> (e.g. serviceability/sa/TestJmapCore.java). >> The reason is that configure detects on some setups that codesign does not >> work ("checking if debug mode c

Re: RFR: JDK-8310380: Handle problems in core-related tests on macOS when codesign tool does not work [v2]

2023-06-22 Thread Matthias Baesken
On Thu, 22 Jun 2023 10:54:12 GMT, Christoph Langer wrote: > Looks a bit better. But I think instead of adding a Utils.javaPath() method, > you can do all this path handling in Platform.launchCodesignOnJavaBinary(). > Then even more code would be shared. Okay, I had the idea to later use the

Re: RFR: JDK-8310380: Handle problems in core-related tests on macOS when codesign tool does not work [v2]

2023-06-22 Thread Matthias Baesken
On Thu, 22 Jun 2023 09:53:29 GMT, Matthias Baesken wrote: >> Currently, a number of tests fail on macOS because they miss the core file >> (e.g. serviceability/sa/TestJmapCore.java). >> The reason is that configure detects on some setups that codesign does not >> work ("checking if debug mode c

Re: RFR: JDK-8310380: Handle problems in core-related tests on macOS when codesign tool does not work [v3]

2023-06-22 Thread Matthias Baesken
> Currently, a number of tests fail on macOS because they miss the core file > (e.g. serviceability/sa/TestJmapCore.java). > The reason is that configure detects on some setups that codesign does not > work ("checking if debug mode codesign is possible... no) . > So adding the needed entitlement

Re: RFR: 8306446: java/lang/management/ThreadMXBean/Locks.java transient failures [v3]

2023-06-22 Thread Kevin Walls
On Wed, 21 Jun 2023 16:56:08 GMT, Kevin Walls wrote: >> This test iterates an array of ThreadInfos in a few places (e.g. in the >> method doCheck()), and needs to tolerate and ignore nulls, in case a thread >> finishes and the test hits an NPE. >> >> There are other calls like "TM.getThreadInf

RFR: 8310628: GcInfoBuilder.c missing JNI Exception checks

2023-06-22 Thread Kevin Walls
JNI calls were identified, where we do not check for a pending Exception afterwards. (JDK-8162530 cleaned up up some of these kind of issues some years back, but more were found.) I tested a code change to manually create an Exception before some of the new ExceptionCheck calls, and this is co

Re: RFR: JDK-8310380: Handle problems in core-related tests on macOS when codesign tool does not work [v2]

2023-06-22 Thread Christoph Langer
On Thu, 22 Jun 2023 09:53:29 GMT, Matthias Baesken wrote: >> Currently, a number of tests fail on macOS because they miss the core file >> (e.g. serviceability/sa/TestJmapCore.java). >> The reason is that configure detects on some setups that codesign does not >> work ("checking if debug mode c

Re: RFR: 8308286 Fix clang warnings in linux code [v6]

2023-06-22 Thread Daniel Jeliński
On Thu, 22 Jun 2023 09:13:21 GMT, Artem Semenov wrote: >> When using the clang compiler to build OpenJDk on Linux, we encounter >> various "warnings as errors". >> They can be fixed with small changes. > > Artem Semenov has updated the pull request incrementally with one additional > commit sin

Re: RFR: JDK-8310380: Handle problems in core-related tests on macOS when codesign tool does not work [v2]

2023-06-22 Thread Matthias Baesken
On Wed, 21 Jun 2023 19:32:23 GMT, Chris Plummer wrote: >> Matthias Baesken has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Some adjustments > > test/lib/jdk/test/lib/util/CoreUtils.java line 131: > >> 129: return coreFileLoc

Re: RFR: JDK-8310380: Handle problems in core-related tests on macOS when codesign tool does not work

2023-06-22 Thread Matthias Baesken
On Tue, 20 Jun 2023 13:23:16 GMT, Matthias Baesken wrote: > Currently, a number of tests fail on macOS because they miss the core file > (e.g. serviceability/sa/TestJmapCore.java). > The reason is that configure detects on some setups that codesign does not > work ("checking if debug mode codes

Re: RFR: JDK-8310380: Handle problems in core-related tests on macOS when codesign tool does not work [v2]

2023-06-22 Thread Matthias Baesken
> Currently, a number of tests fail on macOS because they miss the core file > (e.g. serviceability/sa/TestJmapCore.java). > The reason is that configure detects on some setups that codesign does not > work ("checking if debug mode codesign is possible... no) . > So adding the needed entitlement

Re: RFR: 8310618: Test serviceability/sa/ClhsdbDumpclass.java fails after 8242152: 'StackMapTable:' missing from stdout/stderr

2023-06-22 Thread Daohan Qu
On Thu, 22 Jun 2023 09:37:40 GMT, Kevin Walls wrote: >> This patch should fix >> [JDK-8310618](https://bugs.openjdk.org/browse/JDK-8310618). It attempts to >> correct my errors in fixing >> [JDK-8242152](https://bugs.openjdk.org/browse/JDK-8242152). > > Yes, looks good. 8-) Thanks for your re

Re: RFR: 8310618: Test serviceability/sa/ClhsdbDumpclass.java fails after 8242152: 'StackMapTable:' missing from stdout/stderr

2023-06-22 Thread Kevin Walls
On Thu, 22 Jun 2023 09:17:46 GMT, Daohan Qu wrote: > This patch should fix > [JDK-8310618](https://bugs.openjdk.org/browse/JDK-8310618). It attempts to > correct my errors in fixing > [JDK-8242152](https://bugs.openjdk.org/browse/JDK-8242152). Yes, looks good. 8-) - Marked as re

Re: RFR: JDK-8310550: Adjust references to rt.jar

2023-06-22 Thread Matthias Baesken
On Wed, 21 Jun 2023 21:46:03 GMT, David Holmes wrote: >> There are a few references to rt.jar in comments and in the codebase itself. >> Some of them might be removed or adjusted. > > src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java > line 196: > >> 194: >> 195:

RFR: 8310618: Test serviceability/sa/ClhsdbDumpclass.java fails after 8242152: 'StackMapTable:' missing from stdout/stderr

2023-06-22 Thread Daohan Qu
This patch should fix [JDK-8310618](https://bugs.openjdk.org/browse/JDK-8310618). It attempts to correct my errors in fixing [JDK-8242152](https://bugs.openjdk.org/browse/JDK-8242152). - Commit messages: - Let javap print additional info for checking Changes: https://git.openjdk.

Re: RFR: 8308286 Fix clang warnings in linux code [v5]

2023-06-22 Thread Artem Semenov
On Wed, 21 Jun 2023 07:35:16 GMT, Daniel Jeliński wrote: >> Artem Semenov has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains five commits: >> >> - update >> - update >> - update >> - update >> - 8308286 Fix clang warnings in lin

Re: RFR: 8308286 Fix clang warnings in linux code [v6]

2023-06-22 Thread Artem Semenov
> When using the clang compiler to build OpenJDk on Linux, we encounter various > "warnings as errors". > They can be fixed with small changes. Artem Semenov has updated the pull request incrementally with one additional commit since the last revision: update - Changes: - all:

Re: RFR: 8242152: SA does not include StackMapTables when dumping .class files [v3]

2023-06-22 Thread Daohan Qu
On Thu, 22 Jun 2023 08:59:42 GMT, Kevin Walls wrote: > I see the failure too. javap needs "-v" to show the StackMap info, I see that > on linux release and debug builds. Exactly! @kevinjwalls. And a situation similar to [this one](https://github.com/openjdk/jdk/pull/3004#issuecomment-800679752

Re: RFR: 8242152: SA does not include StackMapTables when dumping .class files [v3]

2023-06-22 Thread Kevin Walls
On Thu, 22 Jun 2023 04:00:14 GMT, Daohan Qu wrote: >> This patch adds `StackMapTable` for the class files generated by `clhsdb`'s >> `buildreplayjars` command. This bug manifests itself during my diagnosing >> [JDK-8309751](https://bugs.openjdk.org/browse/JDK-8309751) and needs to be >> fixed

[jdk21] Integrated: 8310187: Improve Generational ZGC jtreg testing

2023-06-22 Thread Axel Boldt-Christmas
On Tue, 20 Jun 2023 11:17:40 GMT, Axel Boldt-Christmas wrote: > Hi all, > > This pull request contains a backport of commit > [a0595761](https://github.com/openjdk/jdk/commit/a0595761ef35c4eec8cb84326a869b9473cd5bba) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. > > The c

Re: RFR: JDK-8310380: Handle problems in core-related tests on macOS when codesign tool does not work

2023-06-22 Thread Matthias Baesken
On Wed, 21 Jun 2023 15:25:15 GMT, Christoph Langer wrote: >> Currently, a number of tests fail on macOS because they miss the core file >> (e.g. serviceability/sa/TestJmapCore.java). >> The reason is that configure detects on some setups that codesign does not >> work ("checking if debug mode c

Re: RFR: 8242152: SA does not include StackMapTables when dumping .class files [v3]

2023-06-22 Thread Daohan Qu
On Thu, 22 Jun 2023 07:38:21 GMT, David Holmes wrote: > What output is the test looking for i.e why is supposed to be writing it? If > it is the if (DEBUG) debugMessage(...) calls they are not enabled. It is looking for `StackMapTable` info in the javap output. > I've filed https://bugs.openjd

Re: RFR: 8242152: SA does not include StackMapTables when dumping .class files [v3]

2023-06-22 Thread Daohan Qu
On Thu, 22 Jun 2023 04:00:14 GMT, Daohan Qu wrote: >> This patch adds `StackMapTable` for the class files generated by `clhsdb`'s >> `buildreplayjars` command. This bug manifests itself during my diagnosing >> [JDK-8309751](https://bugs.openjdk.org/browse/JDK-8309751) and needs to be >> fixed

Re: RFR: 8242152: SA does not include StackMapTables when dumping .class files [v3]

2023-06-22 Thread David Holmes
On Thu, 22 Jun 2023 04:00:14 GMT, Daohan Qu wrote: >> This patch adds `StackMapTable` for the class files generated by `clhsdb`'s >> `buildreplayjars` command. This bug manifests itself during my diagnosing >> [JDK-8309751](https://bugs.openjdk.org/browse/JDK-8309751) and needs to be >> fixed

Re: RFR: 8242152: SA does not include StackMapTables when dumping .class files [v3]

2023-06-22 Thread Daohan Qu
On Thu, 22 Jun 2023 04:00:14 GMT, Daohan Qu wrote: >> This patch adds `StackMapTable` for the class files generated by `clhsdb`'s >> `buildreplayjars` command. This bug manifests itself during my diagnosing >> [JDK-8309751](https://bugs.openjdk.org/browse/JDK-8309751) and needs to be >> fixed

Re: RFR: 8242152: SA does not include StackMapTables when dumping .class files [v3]

2023-06-22 Thread David Holmes
On Thu, 22 Jun 2023 04:00:14 GMT, Daohan Qu wrote: >> This patch adds `StackMapTable` for the class files generated by `clhsdb`'s >> `buildreplayjars` command. This bug manifests itself during my diagnosing >> [JDK-8309751](https://bugs.openjdk.org/browse/JDK-8309751) and needs to be >> fixed