Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v7]

2023-05-26 Thread Alexander Zvegintsev
On Fri, 26 May 2023 21:50:15 GMT, Phil Race wrote: > macos builds are broken with this change. The problem is > unix/classes/sun/awt/screencast, causing unix/classes/sun/awt/X11 to be built > but it fails because we don't (and shouldn't) generate the XAWT source on > macOS. > > You need to ad

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v8]

2023-05-26 Thread Alexander Zvegintsev
> Modern Linux systems often come with > [Wayland](https://wayland.freedesktop.org/) by default. > This comes with some difficulties, and one of them is the inability to get > screenshots from the system. > This is because we now use the [X Window System > API](https://en.wikipedia.org/wiki/X_Wi

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v7]

2023-05-26 Thread Phil Race
On Thu, 25 May 2023 16:29:39 GMT, Alexander Zvegintsev wrote: >> Modern Linux systems often come with >> [Wayland](https://wayland.freedesktop.org/) by default. >> This comes with some difficulties, and one of them is the inability to get >> screenshots from the system. >> This is because we n

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v22]

2023-05-26 Thread Joe Darcy
On Fri, 26 May 2023 13:22:59 GMT, Jim Laskey wrote: >> Add flexible main methods and anonymous main classes to the Java language. > > Jim Laskey has updated the pull request incrementally with one additional > commit since the last revision: > > Remove trailing whitespace In case I overlooke

Re: RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v5]

2023-05-26 Thread Jiangli Zhou
On Wed, 24 May 2023 21:02:00 GMT, Jiangli Zhou wrote: >> Original description for JDK-8307194 change: >> - >> This PR is branched from the makefile changes for >> https://bugs.openjdk.org/browse/JDK-8303796 and contains the following for >> handling the JDK/hotspot static libraries: >> >>

Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code [v2]

2023-05-26 Thread Martin Doerr
On Fri, 26 May 2023 16:58:41 GMT, Thomas Stuefe wrote: >> The crazy thing is that `malloc` is defined! That means all places where we >> use the term malloc are getting replaced without such a workaround. (E.g. >> for log tags.) > > So, we do this only for malloc? Not for calloc, posix_memalign

Re: RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v4]

2023-05-26 Thread Jiangli Zhou
On Thu, 25 May 2023 01:19:11 GMT, Jiangli Zhou wrote: > > > > My build job is still running, but it has failed in two distinct ways > > > > already. See below for mac fix. Our cross build of arm32 fails with > > > > this message: > > > > ``` > > > > [2023-05-24T19:25:15,310Z] > > > > /opt/mach

Re: RFR: 8308341: JNI_GetCreatedJavaVMs returns a partially initialized JVM

2023-05-26 Thread Gerard Ziemski
On Thu, 25 May 2023 05:02:19 GMT, David Holmes wrote: > We now track the in-progress and completed states of VM creation and only > return a VM from JNI_GetCreatedJavaVMs when there is a fully initialized VM. > > Testing: > - new regression test > - tiers 1-3 (sanity) > > Thanks test/hotsp

Re: RFR: 8308341: JNI_GetCreatedJavaVMs returns a partially initialized JVM

2023-05-26 Thread Gerard Ziemski
On Thu, 25 May 2023 05:02:19 GMT, David Holmes wrote: > We now track the in-progress and completed states of VM creation and only > return a VM from JNI_GetCreatedJavaVMs when there is a fully initialized VM. > > Testing: > - new regression test > - tiers 1-3 (sanity) > > Thanks Looks fine

Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code [v2]

2023-05-26 Thread Thomas Stuefe
On Thu, 25 May 2023 18:18:43 GMT, Martin Doerr wrote: >> src/hotspot/share/utilities/globalDefinitions_xlc.hpp line 47: >> >>> 45: #undef malloc >>> 46: extern void *malloc(size_t) asm("vec_malloc"); >>> 47: #endif >> >> Wow! And I don't mean that in a good way. I'm not questioning whethe

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v7]

2023-05-26 Thread Maxim Kartashev
On Thu, 25 May 2023 16:29:39 GMT, Alexander Zvegintsev wrote: >> Modern Linux systems often come with >> [Wayland](https://wayland.freedesktop.org/) by default. >> This comes with some difficulties, and one of them is the inability to get >> screenshots from the system. >> This is because we n

RFR: 8308969: make test-prebuilt doesn't return the correct exit code

2023-05-26 Thread Antonios Printezis
For 'make' test and 'make test-only' the existence of exit-with-error is checked in the main target in Init.gmk. Is there a better way to fix this than to check for the existence of exit-with-error in RunTestsPrebuilt.gmk? - Commit messages: - 8308969: make test-prebuilt doesn't re

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v7]

2023-05-26 Thread Alexander Zvegintsev
On Fri, 26 May 2023 15:32:41 GMT, Maxim Kartashev wrote: > Tried running this version on my machine (Ubuntu 22.04, two displays with > 100% and 200% scaling). A few observations: > > 1. I couldn't get any of the screenshot tests working through `jtreg` > (screenshots are all black, no per

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v7]

2023-05-26 Thread Maxim Kartashev
On Thu, 25 May 2023 16:29:39 GMT, Alexander Zvegintsev wrote: >> Modern Linux systems often come with >> [Wayland](https://wayland.freedesktop.org/) by default. >> This comes with some difficulties, and one of them is the inability to get >> screenshots from the system. >> This is because we n

Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code [v2]

2023-05-26 Thread Martin Doerr
On Fri, 26 May 2023 08:31:46 GMT, JoKern65 wrote: >> When using the new xlc17 compiler (based on a recent clang) to build OpenJDk >> on AIX , we run into various "warnings as errors". >> Some of those are in shared codebase and could be addressed by small >> adjustments. >> A lot of those chang

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v22]

2023-05-26 Thread Jim Laskey
> Add flexible main methods and anonymous main classes to the Java language. Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Remove trailing whitespace - Changes: - all: https://git.openjdk.org/jdk/pull/13689/files - n

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v21]

2023-05-26 Thread Jim Laskey
> Add flexible main methods and anonymous main classes to the Java language. Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Add main tests for inferface/enum/record - Changes: - all: https://git.openjdk.org/jdk/pull/13

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v20]

2023-05-26 Thread Jim Laskey
On Fri, 26 May 2023 06:20:14 GMT, Rémi Forax wrote: >> test/jdk/tools/launcher/InstanceMainTest.java line 31: >> >>> 29: * @run main InstanceMainTest >>> 30: */ >>> 31: public class InstanceMainTest extends TestHelper { >> >> By my reading of the spec, "main" methods can be defined in record

Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code [v2]

2023-05-26 Thread JoKern65
On Fri, 26 May 2023 08:31:46 GMT, JoKern65 wrote: >> When using the new xlc17 compiler (based on a recent clang) to build OpenJDk >> on AIX , we run into various "warnings as errors". >> Some of those are in shared codebase and could be addressed by small >> adjustments. >> A lot of those chang

Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code [v2]

2023-05-26 Thread Matthias Baesken
On Fri, 26 May 2023 10:18:37 GMT, JoKern65 wrote: > Here are the reasons for the disabled warnings in > make/modules/java.base/lib/CoreLibraries.gmk > DISABLED_WARNINGS_clang_aix_ProcessHandleImpl_unix.c := sign-compare, > DISABLED_WARNINGS_clang_aix := gnu-pointer-arith, DISABLED_WARNINGS_cla

Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code [v2]

2023-05-26 Thread Matthias Baesken
On Fri, 26 May 2023 10:18:37 GMT, JoKern65 wrote: > src/java.base/share/native/libjli/java.c:2311:22: error: format string is not > a string literal [-Werror,-Wformat-nonliteral] vfprintf(stderr, fmt, vl); ^~~ We disable this warning too for clang on all platforms in BUILD_LIBJLI ( DISABLED_WA

Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code [v2]

2023-05-26 Thread Matthias Baesken
On Fri, 26 May 2023 10:05:56 GMT, JoKern65 wrote: > src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c:1251:7: error: > '_ALLBSD_SOURCE' is not defined, evaluates to 0 [-Werror,-Wundef] > #elif _ALLBSD_SOURCE > Should probably better be `#elif defined(_ALLBSD_SOURCE)` - P

Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code [v2]

2023-05-26 Thread JoKern65
On Fri, 26 May 2023 08:31:46 GMT, JoKern65 wrote: >> When using the new xlc17 compiler (based on a recent clang) to build OpenJDk >> on AIX , we run into various "warnings as errors". >> Some of those are in shared codebase and could be addressed by small >> adjustments. >> A lot of those chang

Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code [v2]

2023-05-26 Thread JoKern65
On Fri, 26 May 2023 08:31:46 GMT, JoKern65 wrote: >> When using the new xlc17 compiler (based on a recent clang) to build OpenJDk >> on AIX , we run into various "warnings as errors". >> Some of those are in shared codebase and could be addressed by small >> adjustments. >> A lot of those chang

Re: RFR: 8308341: JNI_GetCreatedJavaVMs returns a partially initialized JVM

2023-05-26 Thread Johan Sjölen
On Fri, 26 May 2023 01:06:21 GMT, David Holmes wrote: >> src/hotspot/share/prims/jni.cpp line 3943: >> >>> 3941: // initialization, so only bail-out if something seems very wrong. >>> 3942: // Though how would we get here in that case? >>> 3943: if (vm_created == NOT_CREATED) { >> >> Shou

Re: RFR: 8308341: JNI_GetCreatedJavaVMs returns a partially initialized JVM

2023-05-26 Thread Johan Sjölen
On Thu, 25 May 2023 05:02:19 GMT, David Holmes wrote: > We now track the in-progress and completed states of VM creation and only > return a VM from JNI_GetCreatedJavaVMs when there is a fully initialized VM. > > Testing: > - new regression test > - tiers 1-3 (sanity) > > Thanks Thank you

Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code [v2]

2023-05-26 Thread JoKern65
> When using the new xlc17 compiler (based on a recent clang) to build OpenJDk > on AIX , we run into various "warnings as errors". > Some of those are in shared codebase and could be addressed by small > adjustments. > A lot of those changes are in hotspot, some might be somewhere else in the >

Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code

2023-05-26 Thread Matthias Baesken
On Fri, 26 May 2023 07:12:07 GMT, Matthias Baesken wrote: >> This is IBMs declaration of statfs >> `extern int statfs(char *, struct statfs *);` >> So the compiler will not accept a `const char*` >> Indeed I do not know if this ever worked, but my change makes it not worse. > > Here is the docume

Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code

2023-05-26 Thread Matthias Baesken
On Thu, 25 May 2023 16:13:49 GMT, JoKern65 wrote: >> test/jdk/java/io/File/libGetXSpace.c line 128: >> >>> 126: #else >>> 127: struct statfs buf; >>> 128: int result = statfs((char*)chars, &buf); >> >> Is this working around a bug in IBM's declaration? >> >> Also, pre-existing, the cas