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
>
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:
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:
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:
>
>>
> 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
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
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
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:
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
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
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
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
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
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
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
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]
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]
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
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.)
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;
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:
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).
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).
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
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
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 |
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
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
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
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
> 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,
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
>>>
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
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
> 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
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
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:
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
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
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
- 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
>
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
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
> 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
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
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
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
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
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
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
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:
> 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
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
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
> 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
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
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'.
>
>
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
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
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
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
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
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
- 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
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
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.
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
> 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.
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
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
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
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
> 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
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,
>>
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
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
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
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
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
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
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
81 matches
Mail list logo