Re: RFR: 8283340: Remove support for -Dsun.misc.URLClassPath.disableJarChecking

2022-03-17 Thread Jiangli Zhou
On Thu, 17 Mar 2022 23:44:32 GMT, Liam Miller-Cushon wrote: > This change removes support for `-Dsun.misc.URLClassPath.disableJarChecking`. > As discussed in the bug the feature doesn't current work, and only ever > supported scenarios where a security manager is installed, so it seems safe >

Integrated: 8282407: Missing ')' in MacResources.properties

2022-03-17 Thread Alexander Matveev
On Sat, 12 Mar 2022 03:12:30 GMT, Alexander Matveev wrote: > - Fixed by adding missing ']'. > - I changed '()' to '[]', since other error messages use '[]' and not '()'. This pull request has now been integrated. Changeset: d83cee98 Author:Alexander Matveev URL:

Re: RFR: 8283059: Uninitialized warning in check_code.c with GCC 11.2 [v2]

2022-03-17 Thread David Holmes
On Fri, 18 Mar 2022 02:39:23 GMT, Mikael Vidstedt wrote: >> Note: this PR replaces the one I messed up earlier. >> >> Background, from JBS: >> >> src/java.base/share/native/libverify/check_code.c: In function >> 'read_all_code': >> src/java.base/share/native/libverify/check_code.c:942:5:

Re: RFR: 8283059: Uninitialized warning in check_code.c with GCC 11.2 [v2]

2022-03-17 Thread Mikael Vidstedt
On Fri, 18 Mar 2022 02:10:32 GMT, David Holmes wrote: >> Mikael Vidstedt has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Use const char for check_and_push_string_utf > > src/java.base/share/native/libverify/check_code.c line 472: > >>

Re: RFR: 8283059: Uninitialized warning in check_code.c with GCC 11.2 [v2]

2022-03-17 Thread Mikael Vidstedt
> Note: this PR replaces the one I messed up earlier. > > Background, from JBS: > > src/java.base/share/native/libverify/check_code.c: In function > 'read_all_code': > src/java.base/share/native/libverify/check_code.c:942:5: error: 'lengths' may > be used uninitialized

Re: When to initialize the method's class for MethodHandles.Lookup.findStatic()?

2022-03-17 Thread David Holmes
On 18/03/2022 10:51 am, Cheng Jin wrote: Hi Raffaello, My concern is why the verification happens even without initialization in the test without mh.invoke() in the main(), which I don't think is covered or explained in the JVM Spec. Put it in another way, my understanding is, when the class

Re: RFR: 8283225: ClassLoader.c produces incorrect OutOfMemory Exception when length is 0 (aix) [v4]

2022-03-17 Thread David Holmes
On Thu, 17 Mar 2022 16:23:14 GMT, Tyler Steele wrote: >> As described in the linked issue, NullClassBytesTest fails due an >> OutOfMemoryError produced on AIX when the test calls defineClass with a byte >> array of size of 0. The native implementation of defineClass then calls >> malloc with

Re: RFR: 8283059: Uninitialized warning in check_code.c with GCC 11.2

2022-03-17 Thread David Holmes
On Thu, 17 Mar 2022 20:56:34 GMT, Mikael Vidstedt wrote: > Note: this PR replaces the one I messed up earlier. > > Background, from JBS: > > src/java.base/share/native/libverify/check_code.c: In function > 'read_all_code': > src/java.base/share/native/libverify/check_code.c:942:5: error:

Re: RFR: 8279598: Provide adapter from RandomGenerator to Random [v19]

2022-03-17 Thread Joe Darcy
On Wed, 16 Mar 2022 14:54:41 GMT, Yasser Bazzi wrote: >> Hi, could i get a review on this implementation proposed by Stuart Marks, i >> decided to use the >> https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/random/RandomGenerator.html >> interface to create the default

Re: RFR: 8279598: Provide adapter from RandomGenerator to Random [v19]

2022-03-17 Thread liach
On Wed, 16 Mar 2022 14:54:41 GMT, Yasser Bazzi wrote: >> Hi, could i get a review on this implementation proposed by Stuart Marks, i >> decided to use the >> https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/random/RandomGenerator.html >> interface to create the default

Re: When to initialize the method's class for MethodHandles.Lookup.findStatic()?

2022-03-17 Thread Raffaello Giulietti
OK, from what I read so far from you is that you were surprised about the order, not about why verification happens even without initialization. Verification is part of linking, which surely must happen before user code (e.g., initialization) is executed, which explains the order. But once

RE: When to initialize the method's class for MethodHandles.Lookup.findStatic()?

2022-03-17 Thread Cheng Jin
Hi Raffaello, My concern is why the verification happens even without initialization in the test without mh.invoke() in the main(), which I don't think is covered or explained in the JVM Spec. Put it in another way, my understanding is, when the class gets loaded, it is verified which doesn't

Re: When to initialize the method's class for MethodHandles.Lookup.findStatic()?

2022-03-17 Thread Raffaello Giulietti
Cheng, initialization is the last thing that happens because it's where user provided code gets executed. This has always been this way, as long as I can remember. See the JVMS for the gory details. Greetings Raffaello On 2022-03-18 01:21, Cheng Jin wrote: Hi David, 1) for the test

Re: RFR: 8279598: Provide adapter from RandomGenerator to Random [v19]

2022-03-17 Thread Yasser Bazzi
On Wed, 16 Mar 2022 14:54:41 GMT, Yasser Bazzi wrote: >> Hi, could i get a review on this implementation proposed by Stuart Marks, i >> decided to use the >> https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/random/RandomGenerator.html >> interface to create the default

Re: When to initialize the method's class for MethodHandles.Lookup.findStatic()?

2022-03-17 Thread Raffaello Giulietti
Sure, which again shows that Test_2 is not initialized by the lookup of the mh but only upon its invocation. Raffaello On 2022-03-18 00:46, David Holmes wrote: Run with -Xlog:class+init=info to see the classes that get initialized and in what order. David On 18/03/2022 5:53 am, Raffaello

RE: When to initialize the method's class for MethodHandles.Lookup.findStatic()?

2022-03-17 Thread Cheng Jin
Hi David, 1) for the test with mh.invoke() in main(), the log shows: [0.262s][info][class,init] Start class verification for: Test_1 [0.262s][info][class,init] End class verification for: Test_1 [0.263s][info][class,init] 282 Initializing 'Test_1' (0x000800c00800) [0.263s][info][class,init]

Re: When to initialize the method's class for MethodHandles.Lookup.findStatic()?

2022-03-17 Thread Raffaello Giulietti
Hi Cheng, I'm not sure I understand your point. By class initialization I mean what's specified in the JVMS [1]. Are you concerned with initialization or with verification (which precedes initialization)? Raffaello [1]

RFR: 8283340: Remove support for -Dsun.misc.URLClassPath.disableJarChecking

2022-03-17 Thread Liam Miller-Cushon
This change removes support for `-Dsun.misc.URLClassPath.disableJarChecking`. As discussed in the bug the feature doesn't current work, and only ever supported scenarios where a security manager is installed, so it seems safe to remove. - Commit messages: - 8283340: Remove

Re: When to initialize the method's class for MethodHandles.Lookup.findStatic()?

2022-03-17 Thread David Holmes
Run with -Xlog:class+init=info to see the classes that get initialized and in what order. David On 18/03/2022 5:53 am, Raffaello Giulietti wrote: Hi again, here's code that shows that initialization doesn't happen during lookup but only upon invoking the method handle. (I'm on Java 17.)

RE: When to initialize the method's class for MethodHandles.Lookup.findStatic()?

2022-03-17 Thread Cheng Jin
Hi Raffaello, The code snippet I posted previously was not the original test I verified on Java 17 (which was generated via asmtools to trigger verification) Here's the pretty much the test I used: Test_1.java import java.lang.invoke.*; public class Test_1 { static MethodHandle mh;

Re: RFR: 8283059: Uninitialized warning in check_code.c with GCC 11.2

2022-03-17 Thread Mikael Vidstedt
On Thu, 17 Mar 2022 20:56:34 GMT, Mikael Vidstedt wrote: > Note: this PR replaces the one I messed up earlier. > > Background, from JBS: > > src/java.base/share/native/libverify/check_code.c: In function > 'read_all_code': > src/java.base/share/native/libverify/check_code.c:942:5: error:

Re: RFR: 8283277: ISO 4217 Amendment 171 Update

2022-03-17 Thread Joe Wang
On Thu, 17 Mar 2022 18:10:17 GMT, Naoto Sato wrote: > This is to incorporate the ISO 4217 amendment 171 for Sierra Leonean LEONE > redenomination (removing 3 zeros). Its effective date is 4/1, but I went > ahead as JDK19 won't be released by 4/1. Marked as reviewed by joehw (Reviewer).

Re: RFR: 8283277: ISO 4217 Amendment 171 Update

2022-03-17 Thread Iris Clark
On Thu, 17 Mar 2022 18:10:17 GMT, Naoto Sato wrote: > This is to incorporate the ISO 4217 amendment 171 for Sierra Leonean LEONE > redenomination (removing 3 zeros). Its effective date is 4/1, but I went > ahead as JDK19 won't be released by 4/1. Marked as reviewed by iris (Reviewer).

Integrated: 8283325: US_ASCII decoder relies on String.decodeASCII being exhaustive

2022-03-17 Thread Claes Redestad
On Thu, 17 Mar 2022 16:08:42 GMT, Claes Redestad wrote: > Adjust `String.decodeASCII` to deal with the possibility that > `StringCoding.countPositives` can return a value less than the exact number > of leading positive bytes. This is the likely cause of a number of > intermittent but

Re: RFR: 8283325: US_ASCII decoder relies on String.decodeASCII being exhaustive [v2]

2022-03-17 Thread Claes Redestad
On Thu, 17 Mar 2022 19:47:14 GMT, Claes Redestad wrote: >> Adjust `String.decodeASCII` to deal with the possibility that >> `StringCoding.countPositives` can return a value less than the exact number >> of leading positive bytes. This is the likely cause of a number of >> intermittent but

RFR: 8283059: Uninitialized warning in check_code.c with GCC 11.2

2022-03-17 Thread Mikael Vidstedt
Note: this PR replaces the one I messed up earlier. Background, from JBS: src/java.base/share/native/libverify/check_code.c: In function 'read_all_code': src/java.base/share/native/libverify/check_code.c:942:5: error: 'lengths' may be used uninitialized [-Werror=maybe-uninitialized] 942 |

Re: RFR: 8279488: ProcessBuilder inherits contextClassLoader when spawning a process reaper thread

2022-03-17 Thread Roger Riggs
On Tue, 18 Jan 2022 15:57:58 GMT, Roger Riggs wrote: > The thread factory used to create the process reaper threads unnecessarily > inherits the callers thread context classloader. > The result is retention of the class loader. > > The thread factory used for the pool of process reaper threads

Re: RFR: 8283325: US_ASCII decoder relies on String.decodeASCII being exhaustive [v2]

2022-03-17 Thread Roger Riggs
On Thu, 17 Mar 2022 19:47:14 GMT, Claes Redestad wrote: >> Adjust `String.decodeASCII` to deal with the possibility that >> `StringCoding.countPositives` can return a value less than the exact number >> of leading positive bytes. This is the likely cause of a number of >> intermittent but

Withdrawn: 8283059: Uninitialized warning in check_code.c with GCC 11.2

2022-03-17 Thread Mikael Vidstedt
On Fri, 11 Mar 2022 23:38:10 GMT, Mikael Vidstedt wrote: > Background, from JBS: > > src/java.base/share/native/libverify/check_code.c: In function > 'read_all_code': > src/java.base/share/native/libverify/check_code.c:942:5: error: 'lengths' may > be used uninitialized

Re: RFR: 8283059: Uninitialized warning in check_code.c with GCC 11.2 [v2]

2022-03-17 Thread Mikael Vidstedt
On Thu, 17 Mar 2022 20:36:31 GMT, Mikael Vidstedt wrote: >> Background, from JBS: >> >> src/java.base/share/native/libverify/check_code.c: In function >> 'read_all_code': >> src/java.base/share/native/libverify/check_code.c:942:5: error: 'lengths' >> may be used uninitialized

Re: RFR: 8283059: Uninitialized warning in check_code.c with GCC 11.2 [v2]

2022-03-17 Thread Mikael Vidstedt
> Background, from JBS: > > src/java.base/share/native/libverify/check_code.c: In function > 'read_all_code': > src/java.base/share/native/libverify/check_code.c:942:5: error: 'lengths' may > be used uninitialized [-Werror=maybe-uninitialized] > 942 | check_and_push(context, lengths,

Re: RFR: 8283059: Uninitialized warning in check_code.c with GCC 11.2

2022-03-17 Thread Mikael Vidstedt
On Thu, 17 Mar 2022 08:44:57 GMT, Kim Barrett wrote: >> src/java.base/share/native/libverify/check_code.c line 472: >> >>> 470: >>> 471: static void check_and_push(context_type *context, void *ptr, int kind); >>> 472: static void check_and_push_const(context_type *context, const void >>>

Re: RFR: 8283325: US_ASCII decoder relies on String.decodeASCII being exhaustive [v2]

2022-03-17 Thread Daniel D . Daugherty
On Thu, 17 Mar 2022 19:47:14 GMT, Claes Redestad wrote: >> Adjust `String.decodeASCII` to deal with the possibility that >> `StringCoding.countPositives` can return a value less than the exact number >> of leading positive bytes. This is the likely cause of a number of >> intermittent but

Re: When to initialize the method's class for MethodHandles.Lookup.findStatic()?

2022-03-17 Thread Raffaello Giulietti
Hi again, here's code that shows that initialization doesn't happen during lookup but only upon invoking the method handle. (I'm on Java 17.) As long as the 2nd line in main() is commented, you don't see the message "Test_2 initialized", which shows that the lookup doesn't initialize

Re: RFR: 8283325: US_ASCII decoder relies on String.decodeASCII being exhaustive [v2]

2022-03-17 Thread Claes Redestad
> Adjust `String.decodeASCII` to deal with the possibility that > `StringCoding.countPositives` can return a value less than the exact number > of leading positive bytes. This is the likely cause of a number of > intermittent but somewhat common errors on aarch64 tests in our CI. Claes

Re: When to initialize the method's class for MethodHandles.Lookup.findStatic()?

2022-03-17 Thread Raffaello Giulietti
Hi, as far as I can see, the code should not even compile, as there's a static field in Test_1 which is initialized with an expression that throws checked exceptions (findStatic(..)). In addition, it seems to me that there's nothing in your code that reveals whether Test_2 has been

RFR: 8283277: ISO 4217 Amendment 171 Update

2022-03-17 Thread Naoto Sato
This is to incorporate the ISO 4217 amendment 171 for Sierra Leonean LEONE redenomination (removing 3 zeros). Its effective date is 4/1, but I went ahead as JDK19 won't be released by 4/1. - Commit messages: - 8283277: ISO 4217 Amendment 171 Update Changes:

Re: RFR: 8283325: US_ASCII decoder relies on String.decodeASCII being exhaustive

2022-03-17 Thread Daniel D . Daugherty
On Thu, 17 Mar 2022 16:08:42 GMT, Claes Redestad wrote: > Adjust `String.decodeASCII` to deal with the possibility that > `StringCoding.countPositives` can return a value less than the exact number > of leading positive bytes. This is the likely cause of a number of > intermittent but

Re: RFR: 8278794: Infinite loop in DeflaterOutputStream.finish() [v3]

2022-03-17 Thread Lance Andersen
On Thu, 17 Mar 2022 16:56:15 GMT, Ravi Reddy wrote: >> Hi All, >> >> This review request contains fix for infinite loop issue in >> DeflaterOutputStream.finish() in an exception scenario. >> 1. The issue is with 'finished' flag not getting set to correct value when >> there is an IOException

Re: Making enum hashcodes consistent across JVM's

2022-03-17 Thread dfranken . jdk
Hi, Our use case is that we have different instances of an application running in a cloud environment and a precomputed hash code is used downstream to see if object instances generated in different application instances are the same or not. An enum was later added to our model which caused the

Re: When to initialize the method's class for MethodHandles.Lookup.findStatic()?

2022-03-17 Thread Remi Forax
- Original Message - > From: "Cheng Jin" > To: "core-libs-dev" > Sent: Thursday, March 17, 2022 5:42:57 PM > Subject: When to initialize the method's class for > MethodHandles.Lookup.findStatic()? > Hi there, > > The document of >

Re: RFR: 8283287: ClassLoader.c cleanups [v2]

2022-03-17 Thread Thomas Stuefe
On Thu, 17 Mar 2022 16:08:11 GMT, Tyler Steele wrote: >> As mentioned in the issue, I'd like to perform the following tidying on >> ClassLoader.c >> >> - Alphabetize includes. >> - Replace 'if (ptr == 0)' with 'if (ptr == NULL)'. >> - Replace 'return 0' with 'return NULL'. > > Tyler Steele has

Re: RFR: 8283237: CallSite should be a sealed class [v2]

2022-03-17 Thread liach
On Thu, 17 Mar 2022 08:07:23 GMT, liach wrote: >> Change `CallSite` to a sealed class, as `CallSite` is an abstract class >> which does not allow direct subclassing by users per its documentation. >> Since I don't have a JBS account, I posted the content for the CSR in a >> GitHub Gist at

Re: RFR: 8278794: Infinite loop in DeflaterOutputStream.finish() [v3]

2022-03-17 Thread Ravi Reddy
> Hi All, > > This review request contains fix for infinite loop issue in > DeflaterOutputStream.finish() in an exception scenario. > 1. The issue is with 'finished' flag not getting set to correct value when > there is an IOException in > DeflaterOutputStream.finish() which will result in

Re: RFR: 8278794: Infinite loop in DeflaterOutputStream.finish() [v2]

2022-03-17 Thread Ravi Reddy
On Wed, 16 Mar 2022 16:34:37 GMT, Ravi Reddy wrote: >> Hi All, >> >> This review request contains fix for infinite loop issue in >> DeflaterOutputStream.finish() in an exception scenario. >> 1. The issue is with 'finished' flag not getting set to correct value when >> there is an IOException

Re: RFR: 8283225: ClassLoader.c produces incorrect OutOfMemory Exception when length is 0 (aix) [v4]

2022-03-17 Thread Roger Riggs
On Thu, 17 Mar 2022 16:23:14 GMT, Tyler Steele wrote: >> As described in the linked issue, NullClassBytesTest fails due an >> OutOfMemoryError produced on AIX when the test calls defineClass with a byte >> array of size of 0. The native implementation of defineClass then calls >> malloc with

Re: RFR: 8283225: ClassLoader.c produces incorrect OutOfMemory Exception when length is 0 (aix) [v3]

2022-03-17 Thread Tyler Steele
On Thu, 17 Mar 2022 14:48:09 GMT, Roger Riggs wrote: >> src/java.base/share/native/libjava/ClassLoader.c line 102: >> >>> 100: } >>> 101: >>> 102: // On malloc(0), implementators of malloc(3) have the choice to >>> return either >> >> It is confusing to mix `malloc(0)`, where you are

Re: RFR: 8283225: ClassLoader.c produces incorrect OutOfMemory Exception when length is 0 (aix) [v3]

2022-03-17 Thread Tyler Steele
On Thu, 17 Mar 2022 07:46:21 GMT, Thomas Stuefe wrote: >> src/java.base/share/native/libjava/ClassLoader.c line 106: >> >>> 104: // we chose the latter. (see 8283225) >>> 105: #ifdef _AIX >>> 106: body = (jbyte *)malloc(length == 0 ? 1 : length); >> >> Using AIX_ONLY this can be

Re: RFR: 8283325: US_ASCII decoder relies on String.decodeASCII being exhaustive

2022-03-17 Thread Roger Riggs
On Thu, 17 Mar 2022 16:08:42 GMT, Claes Redestad wrote: > Adjust `String.decodeASCII` to deal with the possibility that > `StringCoding.countPositives` can return a value less than the exact number > of leading positive bytes. This is the likely cause of a number of > intermittent but

When to initialize the method's class for MethodHandles.Lookup.findStatic()?

2022-03-17 Thread Cheng Jin
Hi there, The document of https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/invoke/MethodHandles.Lookup.html#findStatic(java.lang.Class,java.lang.String,java.lang.invoke.MethodType) in the Java API is ambiguous in terms of when to initialize the method's class as follows

Integrated: JDK-8283274: Improve @jvms usage in java.base

2022-03-17 Thread Joe Darcy
On Wed, 16 Mar 2022 16:57:12 GMT, Joe Darcy wrote: > As was done for JLS references under JDK-8283234, now the analogous update > for JVMS references. This pull request has now been integrated. Changeset: 5ef1990d Author:Joe Darcy URL:

Re: RFR: 8283225: ClassLoader.c produces incorrect OutOfMemory Exception when length is 0 (aix) [v4]

2022-03-17 Thread Tyler Steele
> As described in the linked issue, NullClassBytesTest fails due an > OutOfMemoryError produced on AIX when the test calls defineClass with a byte > array of size of 0. The native implementation of defineClass then calls > malloc with a size of 0. On AIX malloc(0) returns NULL, while on other

RFR: 8283325: US_ASCII decoder relies on String.decodeASCII being exhaustive

2022-03-17 Thread Claes Redestad
Adjust `String.decodeASCII` to deal with the possibility that `StringCoding.countPositives` can return a value less than the exact number of leading positive bytes. This is the likely cause of a number of intermittent but somewhat common errors on aarch64 tests in our CI. - Commit

Re: RFR: 8257733: Move module-specific data from make to respective module [v9]

2022-03-17 Thread Naoto Sato
On Thu, 17 Mar 2022 00:12:38 GMT, Magnus Ihse Bursie wrote: >> A lot (but not all) of the data in make/data is tied to a specific module. >> For instance, the publicsuffixlist is used by java.base, and fontconfig by >> java.desktop. (A few directories, like mainmanifest, is *actually* used by

Re: RFR: 8283287: ClassLoader.c cleanups [v2]

2022-03-17 Thread Tyler Steele
> As mentioned in the issue, I'd like to perform the following tidying on > ClassLoader.c > > - Alphabetize includes. > - Replace 'if (ptr == 0)' with 'if (ptr == NULL)'. > - Replace 'return 0' with 'return NULL'. Tyler Steele has updated the pull request incrementally with one additional

Re: RFR: 8279598: Provide adapter from RandomGenerator to Random [v19]

2022-03-17 Thread jmehrens
On Wed, 16 Mar 2022 14:54:41 GMT, Yasser Bazzi wrote: >> Hi, could i get a review on this implementation proposed by Stuart Marks, i >> decided to use the >> https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/random/RandomGenerator.html >> interface to create the default

Re: RFR: 8283287: ClassLoader.c cleanups

2022-03-17 Thread Tyler Steele
On Thu, 17 Mar 2022 10:46:35 GMT, Thomas Stuefe wrote: >> As mentioned in the issue, I'd like to perform the following tidying on >> ClassLoader.c >> >> - Alphabetize includes. >> - Replace 'if (ptr == 0)' with 'if (ptr == NULL)'. >> - Replace 'return 0' with 'return NULL'. > >

Re: RFR: 8279598: Provide adapter from RandomGenerator to Random [v19]

2022-03-17 Thread liach
On Wed, 16 Mar 2022 14:54:41 GMT, Yasser Bazzi wrote: >> Hi, could i get a review on this implementation proposed by Stuart Marks, i >> decided to use the >> https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/random/RandomGenerator.html >> interface to create the default

Re: Making enum hashcodes consistent across JVM's

2022-03-17 Thread Raffaello Giulietti
Hi, specifying a fixed hashCode() algorithm has the important drawback that it prevents evolution. For example, as you note, String has a strictly specified algorithm [1] that was perhaps a good one in the early days of Java (around 1995) but has shown its deficiencies over the years. In

Re: RFR: 8283225: [AIX] ClassLoader.c produces incorrect OutOfMemory Exception when length is 0 [v3]

2022-03-17 Thread Roger Riggs
On Thu, 17 Mar 2022 07:44:35 GMT, David Holmes wrote: >> Tyler Steele has refreshed the contents of this pull request, and previous >> commits have been removed. The incremental views will show differences >> compared to the previous content of the PR. The pull request contains one >> new

Re: RFR: 8279508: Auto-vectorize Math.round API [v17]

2022-03-17 Thread Andrew Haley
On Sun, 13 Mar 2022 06:36:15 GMT, Jatin Bhateja wrote: >> Summary of changes: >> - Intrinsify Math.round(float) and Math.round(double) APIs. >> - Extend auto-vectorizer to infer vector operations on encountering scalar >> IR nodes for above intrinsics. >> - Test creation using new IR testing

RFR: 8283279: [Testbug] Improve TestGetSwapSpaceSize

2022-03-17 Thread Severin Gehwolf
Please review this container test improvement. The test in question only makes sense iff the total swap space size as reported by the container aware OperatingSystemMXBean is `0`. If that's not the case, then something else might be amiss, e.g. OperatingSystemMXBean reporting the host swap

Re: RFR: 8257733: Move module-specific data from make to respective module [v9]

2022-03-17 Thread Erik Joelsson
On Thu, 17 Mar 2022 00:12:38 GMT, Magnus Ihse Bursie wrote: >> A lot (but not all) of the data in make/data is tied to a specific module. >> For instance, the publicsuffixlist is used by java.base, and fontconfig by >> java.desktop. (A few directories, like mainmanifest, is *actually* used by

Re: Making enum hashcodes consistent across JVM's

2022-03-17 Thread Remi Forax
- Original Message - > From: "dfranken jdk" > To: "core-libs-dev" > Sent: Thursday, March 17, 2022 1:49:08 PM > Subject: Making enum hashcodes consistent across JVM's > Dear all, > > Currently enums do not have a well-defined hashCode() implementation so > they defer to

Making enum hashcodes consistent across JVM's

2022-03-17 Thread dfranken . jdk
Dear all, Currently enums do not have a well-defined hashCode() implementation so they defer to Object.hashCode() which just uses an internal mechanism to determine the hashcode, likely based on the object's place in the heap. This may confuse a lot of developers as other classes such as String

Re: RFR: 8283287: Spring Cleaning for ClassLoader.c

2022-03-17 Thread Thomas Stuefe
On Wed, 16 Mar 2022 21:25:37 GMT, Tyler Steele wrote: > As mentioned in the issue, I'd like to perform the following tidying on > ClassLoader.c > > - Alphabetize includes. > - Replace 'if (ptr == 0)' with 'if (ptr == NULL)'. > - Replace 'return 0' with 'return NULL'. Looks good in general.

Integrated: 8281146: Replace StringCoding.hasNegatives with countPositives

2022-03-17 Thread Claes Redestad
On Wed, 26 Jan 2022 12:51:31 GMT, Claes Redestad wrote: > I'm requesting comments and, hopefully, some help with this patch to replace > `StringCoding.hasNegatives` with `countPositives`. The new method does a very > similar pass, but alters the intrinsic to return the number of leading bytes

Re: RFR: 8281146: Replace StringCoding.hasNegatives with countPositives [v16]

2022-03-17 Thread Claes Redestad
> I'm requesting comments and, hopefully, some help with this patch to replace > `StringCoding.hasNegatives` with `countPositives`. The new method does a very > similar pass, but alters the intrinsic to return the number of leading bytes > in the `byte[]` range which only has positive bytes.

Re: RFR: 8283059: Uninitialized warning in check_code.c with GCC 11.2

2022-03-17 Thread Kim Barrett
On Fri, 11 Mar 2022 23:38:10 GMT, Mikael Vidstedt wrote: > Background, from JBS: > > src/java.base/share/native/libverify/check_code.c: In function > 'read_all_code': > src/java.base/share/native/libverify/check_code.c:942:5: error: 'lengths' may > be used uninitialized

Re: RFR: 8283059: Uninitialized warning in check_code.c with GCC 11.2

2022-03-17 Thread Kim Barrett
On Thu, 17 Mar 2022 08:08:07 GMT, Kim Barrett wrote: >> Background, from JBS: >> >> src/java.base/share/native/libverify/check_code.c: In function >> 'read_all_code': >> src/java.base/share/native/libverify/check_code.c:942:5: error: 'lengths' >> may be used uninitialized

Re: RFR: 8283059: Uninitialized warning in check_code.c with GCC 11.2

2022-03-17 Thread Kim Barrett
On Thu, 17 Mar 2022 06:59:01 GMT, David Holmes wrote: >> Background, from JBS: >> >> src/java.base/share/native/libverify/check_code.c: In function >> 'read_all_code': >> src/java.base/share/native/libverify/check_code.c:942:5: error: 'lengths' >> may be used uninitialized

Re: RFR: 8283059: Uninitialized warning in check_code.c with GCC 11.2

2022-03-17 Thread Kim Barrett
On Fri, 11 Mar 2022 23:38:10 GMT, Mikael Vidstedt wrote: > Background, from JBS: > > src/java.base/share/native/libverify/check_code.c: In function > 'read_all_code': > src/java.base/share/native/libverify/check_code.c:942:5: error: 'lengths' may > be used uninitialized

Re: RFR: 8283237: CallSite should be a sealed class [v2]

2022-03-17 Thread liach
> Change `CallSite` to a sealed class, as `CallSite` is an abstract class which > does not allow direct subclassing by users per its documentation. Since I > don't have a JBS account, I posted the content for the CSR in a GitHub Gist > at https://gist.github.com/150d5aa7f8b13a4deddf95969ad39d73

Re: RFR: 8283237: CallSite should be a sealed class

2022-03-17 Thread Rémi Forax
On Thu, 17 Mar 2022 07:32:40 GMT, liach wrote: >> src/java.base/share/classes/java/lang/invoke/CallSite.java line 88: >> >>> 86: */ >>> 87: public >>> 88: abstract sealed class CallSite permits ConstantCallSite, >>> VolatileCallSite, MutableCallSite { >> >> Nitpicking with my JSR 292 hat, >>

Re: RFR: 8283225: [AIX] ClassLoader.c produces incorrect OutOfMemory Exception when length is 0 [v3]

2022-03-17 Thread Thomas Stuefe
On Wed, 16 Mar 2022 21:10:14 GMT, Tyler Steele wrote: >> As described in the linked issue, NullClassBytesTest fails due an >> OutOfMemoryError produced on AIX when the test calls defineClass with a byte >> array of size of 0. The native implementation of defineClass then calls >> malloc with

Re: RFR: 8283225: [AIX] ClassLoader.c produces incorrect OutOfMemory Exception when length is 0 [v3]

2022-03-17 Thread Thomas Stuefe
On Thu, 17 Mar 2022 07:44:39 GMT, David Holmes wrote: > Using AIX_ONLY this can be simplified: > > `body = (jbyte *)malloc(length AIX_ONLY( == 0 ? 1 : length));` This is jdk, not hotspot. Do we have AIX_ONLY in the JDK? - PR: https://git.openjdk.java.net/jdk/pull/7829

Re: RFR: 8283225: [AIX] ClassLoader.c produces incorrect OutOfMemory Exception when length is 0 [v3]

2022-03-17 Thread David Holmes
On Wed, 16 Mar 2022 21:10:14 GMT, Tyler Steele wrote: >> As described in the linked issue, NullClassBytesTest fails due an >> OutOfMemoryError produced on AIX when the test calls defineClass with a byte >> array of size of 0. The native implementation of defineClass then calls >> malloc with

Re: RFR: 8283237: CallSite should be a sealed class

2022-03-17 Thread liach
On Thu, 17 Mar 2022 06:47:13 GMT, Rémi Forax wrote: >> Change `CallSite` to a sealed class, as `CallSite` is an abstract class >> which does not allow direct subclassing by users per its documentation. >> Since I don't have a JBS account, I posted the content for the CSR in a >> GitHub Gist

Re: RFR: 8283225: [AIX] ClassLoader.c produces incorrect OutOfMemory Exception when length is 0 [v3]

2022-03-17 Thread Thomas Stuefe
On Wed, 16 Mar 2022 21:10:14 GMT, Tyler Steele wrote: >> As described in the linked issue, NullClassBytesTest fails due an >> OutOfMemoryError produced on AIX when the test calls defineClass with a byte >> array of size of 0. The native implementation of defineClass then calls >> malloc with

Re: RFR: 8283059: Uninitialized warning in check_code.c with GCC 11.2

2022-03-17 Thread David Holmes
On Fri, 11 Mar 2022 23:38:10 GMT, Mikael Vidstedt wrote: > Background, from JBS: > > src/java.base/share/native/libverify/check_code.c: In function > 'read_all_code': > src/java.base/share/native/libverify/check_code.c:942:5: error: 'lengths' may > be used uninitialized

Re: RFR: 8283237: CallSite should be a sealed class

2022-03-17 Thread Rémi Forax
On Wed, 16 Mar 2022 13:09:30 GMT, liach wrote: > Change `CallSite` to a sealed class, as `CallSite` is an abstract class which > does not allow direct subclassing by users per its documentation. Since I > don't have a JBS account, I posted the content for the CSR in a GitHub Gist > at