On Fri, 27 Jan 2023 13:53:45 GMT, Glavo wrote:
>> I checked the `java.base` module, and all the `Collection#toArray()` method
>> of collections be implemented correctly.
>>
>> Their return values can be trusted, so many unnecessary array duplication
>> can be eliminated.
>
> Glavo has updated
On Fri, 27 Jan 2023 16:04:41 GMT, Roger Riggs wrote:
>> This is the javadoc of `JavaLangAccess::newStringNoRepl`:
>>
>>
>> /**
>> * Constructs a new {@code String} by decoding the specified subarray of
>> * bytes using the specified {@linkplain java.nio.charset.Charset
>> charset
On Fri, 20 Jan 2023 16:47:27 GMT, Glavo wrote:
> This is the javadoc of `JavaLangAccess::newStringNoRepl`:
>
>
> /**
> * Constructs a new {@code String} by decoding the specified subarray of
> * bytes using the specified {@linkplain java.nio.charset.Charset
> charset}.
> *
>
On Fri, 20 Jan 2023 16:47:27 GMT, Glavo wrote:
> This is the javadoc of `JavaLangAccess::newStringNoRepl`:
>
>
> /**
> * Constructs a new {@code String} by decoding the specified subarray of
> * bytes using the specified {@linkplain java.nio.charset.Charset
> charset}.
> *
>
This is the javadoc of `JavaLangAccess::newStringNoRepl`:
/**
* Constructs a new {@code String} by decoding the specified subarray of
* bytes using the specified {@linkplain java.nio.charset.Charset charset}.
*
* The caller of this method shall relinquish and transfer the
Hi,
ZipFile.Source.readFullyAt caps its calls to RandomAccessFile.readFully to
a maximum of 8192 bytes per call, like this:
int N = len;
> while (N > 0) {
> int n = Math.min(BUF_SIZE, N);
> zfile.readFully(buf, off, n);
> off += n;
> N -= n;
> }
I'm observing a ~10% speedup of t
On Thu, 12 Jan 2023 18:44:26 GMT, Eirik Bjorsnos wrote:
> Some call sites of SignatureFileVerifier.isBlockOrSF fails to check that
> files reside in META-INF directly, and not in a subdirectory of META-INF.
>
> The mentioned call sites needs updates to check and ignore such files.
>
> A new te
On Fri, 27 Jan 2023 21:00:03 GMT, Jesper Wilhelmsson
wrote:
> Forwardport JDK 20 -> JDK 21
This pull request has now been integrated.
Changeset: 5c59de52
Author:Jesper Wilhelmsson
URL:
https://git.openjdk.org/jdk/commit/5c59de52a31da937663ad2cef055213489b0516e
Stats: 1078 lines
On Fri, 27 Jan 2023 22:16:18 GMT, Weijun Wang wrote:
> Maybe we can rename `ZipFile::isSignatureRelated` to `ZipFile::isBlockOrSF`
> as well?
The term "signature related" seems to be used quite extensively around ZipFile
and also in JavaUtilZipFileAccess. Semantics are very similar, but not ex
On Fri, 27 Jan 2023 22:10:38 GMT, Roger Riggs wrote:
>> The only changes I made myself in the test files are in
>> Basic-X.java.template (including the copyright year). The other files were
>> generated by a script, which happens to also change the copyright year for
>> otherwise unmodified fi
> Align `double` and `float` decimal conversions in `java.util.Formatter` with
> the algorithm used in `Double.toString(double)`.
Raffaello Giulietti has updated the pull request incrementally with one
additional commit since the last revision:
8300869: Make use of the Double.toString(double)
On Fri, 27 Jan 2023 21:36:29 GMT, Claes Redestad wrote:
>> Scott Gibbons has updated the pull request with a new target base due to a
>> merge or a rebase. The incremental webrev excludes the unrelated changes
>> brought in by the merge/rebase. The pull request contains 13 additional
>> commit
On Fri, 27 Jan 2023 18:31:50 GMT, Scott Gibbons wrote:
>> Added code for Base64 acceleration (encode and decode) which will accelerate
>> ~4x for AVX2 platforms.
>>
>> Encode performance:
>> **Old:**
>>
>> Benchmark (maxNumBytes) Mode Cnt Score Error
>> Units
>
On Tue, 24 Jan 2023 12:31:30 GMT, Eirik Bjorsnos wrote:
>> Some call sites of SignatureFileVerifier.isBlockOrSF fails to check that
>> files reside in META-INF directly, and not in a subdirectory of META-INF.
>>
>> The mentioned call sites needs updates to check and ignore such files.
>>
>> A
On Fri, 27 Jan 2023 21:27:57 GMT, Raffaello Giulietti
wrote:
>> test/jdk/java/util/Formatter/BasicInt.java line 1:
>>
>>> 1: /*
>>
>> It looks line the non-float/double test classes are unchanged, they could be
>> dropped from the PR.
>
> The only changes I made myself in the test files are i
On Fri, 27 Jan 2023 19:56:28 GMT, Roger Riggs wrote:
>> Raffaello Giulietti has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8300869: Make use of the Double.toString(double) algorithm in
>> java.util.Formatter
>>
>> Added tests for
Forwardport JDK 20 -> JDK 21
-
Commit messages:
- Merge remote-tracking branch 'jdk20/master' into Merge_jdk20
- 8301206: Fix issue with LocaleData after JDK-8300719
- 8300953: ClassDesc::ofInternalName missing @since tag
- 8300719: JDK 20 RDP2 L10n resource files update
The webr
On Fri, 27 Jan 2023 20:58:40 GMT, Rémi Forax wrote:
> I think the simplest solution is to have a non public interface declared
> inside java.util. Like java.util.RandomAccess, but non public. The main
> advantage to use an interface is that you can document it and it's easy to
> find all the i
On Fri, 27 Jan 2023 13:53:45 GMT, Glavo wrote:
>> I checked the `java.base` module, and all the `Collection#toArray()` method
>> of collections be implemented correctly.
>>
>> Their return values can be trusted, so many unnecessary array duplication
>> can be eliminated.
>
> Glavo has updated
On Fri, 27 Jan 2023 14:28:08 GMT, Alan Bateman wrote:
> I skimmed through the latest update. I see you've considered the possibility
> of a Matryoshka doll showing up but the optimization is still very very
> scary. I think it would require an audit of every API in java.base that
> potentially
On Fri, 27 Jan 2023 18:19:58 GMT, Raffaello Giulietti
wrote:
>> Align `double` and `float` decimal conversions in `java.util.Formatter` with
>> the algorithm used in `Double.toString(double)`.
>
> Raffaello Giulietti has updated the pull request incrementally with one
> additional commit since
On Wed, 25 Jan 2023 21:41:37 GMT, Tagir F. Valeev wrote:
> number of minor cleanups could be done in Arrays and Collections utility
> classes.
> In Arrays:
> - Redundant import jdk.internal.misc.Unsafe;
> - C-style array declaration is used in public static boolean equals(short[]
> a, short a2[
On Thu, 10 Nov 2022 01:10:13 GMT, Jonathan Gibbons wrote:
> Please review a "somewhat automated" change to insert `@spec` tags into doc
> comments, as appropriate, to leverage the recent new javadoc feature to
> generate a new page listing the references to all external specifications
> listed
> Added code for Base64 acceleration (encode and decode) which will accelerate
> ~4x for AVX2 platforms.
>
> Encode performance:
> **Old:**
>
> Benchmark (maxNumBytes) Mode Cnt Score Error
> Units
> Base64Encode.testBase64Encode 1024 thrpt3 4309.4
On Thu, 26 Jan 2023 21:03:59 GMT, Mandy Chung wrote:
> Currently, a `Lookup` object with `PACKAGE` access can be used to inject a
> class in the runtime package of the Lookup's lookup class via
> `Lookup::defineClass`. The classes that are injected have the same access
> as other members in
On Fri, 27 Jan 2023 18:20:42 GMT, Mandy Chung wrote:
>> Currently, a `Lookup` object with `PACKAGE` access can be used to inject a
>> class in the runtime package of the Lookup's lookup class via
>> `Lookup::defineClass`. The classes that are injected have the same access
>> as other members
On Fri, 27 Jan 2023 18:20:42 GMT, Mandy Chung wrote:
>> Currently, a `Lookup` object with `PACKAGE` access can be used to inject a
>> class in the runtime package of the Lookup's lookup class via
>> `Lookup::defineClass`. The classes that are injected have the same access
>> as other members
On Wed, 25 Jan 2023 22:23:26 GMT, Tagir F. Valeev wrote:
>> number of minor cleanups could be done in Arrays and Collections utility
>> classes.
>> In Arrays:
>> - Redundant import jdk.internal.misc.Unsafe;
>> - C-style array declaration is used in public static boolean equals(short[]
>> a, sho
On Fri, 27 Jan 2023 18:19:58 GMT, Raffaello Giulietti
wrote:
>> Align `double` and `float` decimal conversions in `java.util.Formatter` with
>> the algorithm used in `Double.toString(double)`.
>
> Raffaello Giulietti has updated the pull request incrementally with one
> additional commit since
> Currently, a `Lookup` object with `PACKAGE` access can be used to inject a
> class in the runtime package of the Lookup's lookup class via
> `Lookup::defineClass`. The classes that are injected have the same access
> as other members in the module and can access private members of all types
> Align `double` and `float` decimal conversions in `java.util.Formatter` with
> the algorithm used in `Double.toString(double)`.
Raffaello Giulietti has updated the pull request incrementally with one
additional commit since the last revision:
8300869: Make use of the Double.toString(double)
On Fri, 27 Jan 2023 14:28:08 GMT, Alan Bateman wrote:
> It might be better to focus on a few specific cases that can be proven to be
> safe
As of trusted collections from java.base we have
- ArrayList
- Arrays.asList()
- HashSet
- LinkedHashSet
- TreeSet
- EnumSet
- ArrayDeque
- COWArrayList
-
On Fri, 6 Jan 2023 22:38:13 GMT, Justin Lu wrote:
> When their input is null, the following methods in java.util.TimeZone throw a
> NullPointerException:
>
> _TimeZone.getTimeZone(String ID)
> TimeZone.setID(String ID)
> TimeZone.inDaylightTime(Date date)_
>
> For example,
>
>
> String some
On Fri, 27 Jan 2023 13:47:07 GMT, Raffaello Giulietti
wrote:
>> src/java.base/share/classes/java/lang/FdLibm.java line 820:
>>
>>> 818: hx = (hx & 0x000f_) | ((0x3ff - i) << 20);
>>> 819: y = (double)(k + i);
>>> 820: x = __HI(x, hx);
>>
>> `
> Restarting the port of FDLIBM to Java with the log10 method.
>
> There are two port, the first a near-transliteration from C port to use as a
> test reference in
>
> test/jdk/java/lang/StrictMath/FdlibmTranslit.java
>
> and a more idiomatic Java port in
>
> src/java.base/share/classes/java/
On Fri, 27 Jan 2023 17:41:43 GMT, Mandy Chung wrote:
>> Currently, a `Lookup` object with `PACKAGE` access can be used to inject a
>> class in the runtime package of the Lookup's lookup class via
>> `Lookup::defineClass`. The classes that are injected have the same access
>> as other members
On Fri, 27 Jan 2023 17:07:08 GMT, Mandy Chung wrote:
>> src/java.base/share/classes/java/lang/Module.java line 605:
>>
>>> 603: * {@link java.lang.invoke.MethodHandles.Lookup Lookup} object
>>> that is allowed to
>>> 604: * {@link
>>> java.lang.invoke.MethodHandles.Lookup#defineClass
> Currently, a `Lookup` object with `PACKAGE` access can be used to inject a
> class in the runtime package of the Lookup's lookup class via
> `Lookup::defineClass`. The classes that are injected have the same access
> as other members in the module and can access private members of all types
On Wed, 25 Jan 2023 20:21:11 GMT, Justin Lu wrote:
>> When their input is null, the following methods in java.util.TimeZone throw
>> a NullPointerException:
>>
>> _TimeZone.getTimeZone(String ID)
>> TimeZone.setID(String ID)
>> TimeZone.inDaylightTime(Date date)_
>>
>> For example,
>>
>>
>>
On Fri, 27 Jan 2023 01:43:11 GMT, Damon Nguyen wrote:
> Localization update didn't include an update to LocaleData file. This PR
> addresses this by updating the file with the newly translated values. The
> LocaleDataTest now passes. This should address the recent related failures to
> LocaleD
+1
Unfortunately, it would be too disruptive to change the decades old
behavior.
Naoto
On 1/27/23 3:53 AM, Alan Bateman wrote:
On 27/01/2023 05:42, Glavo wrote:
I analyzed the usage of toLowerCase and toUpperCase in OpenJDK more
carefully,
and found that none of the use cases really expect
On Tue, 24 Jan 2023 18:19:22 GMT, Mandy Chung wrote:
> A simple fix in core reflection to check if the number of actual and formal
> parameters differ before invoking the method or the constructor regardless of
> whether it's a specialized case or not.
This pull request has now been integrated
On Fri, 27 Jan 2023 11:44:46 GMT, Alan Bateman wrote:
> I wonder if this should be an apiNote rather method description.
I considered this and no clear cut on this. I don't have a strong opinion on
this. What do you think?
-
PR: https://git.openjdk.org/jdk/pull/12236
On Wed, 25 Jan 2023 22:23:26 GMT, Tagir F. Valeev wrote:
>> number of minor cleanups could be done in Arrays and Collections utility
>> classes.
>> In Arrays:
>> - Redundant import jdk.internal.misc.Unsafe;
>> - C-style array declaration is used in public static boolean equals(short[]
>> a, sho
On Fri, 27 Jan 2023 16:02:38 GMT, Raffaello Giulietti
wrote:
> Align `double` and `float` decimal conversions in `java.util.Formatter` with
> the algorithm used in `Double.toString(double)`.
The specification in `Formatter` explicitly refers to the outcome of
`Double.toString(double)`. Howeve
Align `double` and `float` decimal conversions in `java.util.Formatter` with
the algorithm used in `Double.toString(double)`.
-
Commit messages:
- 8300869: Make use of the Double.toString(double) algorithm in
java.util.Formatter
Changes: https://git.openjdk.org/jdk/pull/12259/file
On Tue, 24 Jan 2023 13:35:14 GMT, Adam Sotona wrote:
> ClassDesc::ofInternalName was added in JDK 20, however @since tag is missing.
> This patch fixes the javadoc.
>
> Please review.
>
> Thanks,
> Adam
This pull request has now been integrated.
Changeset: b22e5216
Author:Adam Sotona
U
On Tue, 24 Jan 2023 13:35:14 GMT, Adam Sotona wrote:
> ClassDesc::ofInternalName was added in JDK 20, however @since tag is missing.
> This patch fixes the javadoc.
>
> Please review.
>
> Thanks,
> Adam
Marked as reviewed by jjg (Reviewer).
-
PR: https://git.openjdk.org/jdk20/p
> This is root pull request with Classfile API implementation, tests and
> benchmarks initial drop into JDK.
>
> Following pull requests consolidating JDK class files parsing, generating,
> and transforming ([JDK-8294957](https://bugs.openjdk.org/browse/JDK-8294957))
> will chain to this one.
>
On Fri, 27 Jan 2023 13:53:45 GMT, Glavo wrote:
>> I checked the `java.base` module, and all the `Collection#toArray()` method
>> of collections be implemented correctly.
>>
>> Their return values can be trusted, so many unnecessary array duplication
>> can be eliminated.
>
> Glavo has updated
> I checked the `java.base` module, and all the `Collection#toArray()` method
> of collections be implemented correctly.
>
> Their return values can be trusted, so many unnecessary array duplication can
> be eliminated.
Glavo has updated the pull request incrementally with one additional commit
On Fri, 27 Jan 2023 06:52:31 GMT, Joe Darcy wrote:
> Restarting the port of FDLIBM to Java with the log10 method.
>
> There are two port, the first a near-transliteration from C port to use as a
> test reference in
>
> test/jdk/java/lang/StrictMath/FdlibmTranslit.java
>
> and a more idiomatic
On Fri, 27 Jan 2023 13:45:18 GMT, Raffaello Giulietti
wrote:
>> Restarting the port of FDLIBM to Java with the log10 method.
>>
>> There are two port, the first a near-transliteration from C port to use as a
>> test reference in
>>
>> test/jdk/java/lang/StrictMath/FdlibmTranslit.java
>>
>> a
> This is root pull request with Classfile API implementation, tests and
> benchmarks initial drop into JDK.
>
> Following pull requests consolidating JDK class files parsing, generating,
> and transforming ([JDK-8294957](https://bugs.openjdk.org/browse/JDK-8294957))
> will chain to this one.
>
On Fri, 27 Jan 2023 12:15:34 GMT, Glavo wrote:
> > What about Collections.synchronizedCollection and other methods that may
> > wrap/delagete to collections from other modules?
>
> Good question, I missed this point. I think I should provide a helper method
> to check whether the collection is
On Fri, 27 Jan 2023 02:34:37 GMT, Damon Nguyen wrote:
>> Localization update didn't include an update to LocaleData file. This PR
>> addresses this by updating the file with the newly translated values. The
>> LocaleDataTest now passes. This should address the recent related failures
>> to Loc
On 27/01/2023 11:50, David Schumann wrote:
Hello,
during a PenTest we found a ReDos issue in the JRE which causes
Matcher.matches() to go into an endless loop. Is such an issue
considered a bug for the JDK team (aka should I file a bug report)? Or
is such an issue considered "by design"?
Th
Please file a bug report with the relevant (and disclosable) details.
From: core-libs-dev on behalf of David
Schumann
Date: Friday, 27 January 2023 at 12:50
To: core-libs-dev@openjdk.org
Subject: Is ReDos seen as bug/vulnerability?
Hello,
during a PenTest we found a ReDos issue in the JRE wh
On Fri, 27 Jan 2023 11:35:54 GMT, Alan Bateman wrote:
> What about Collections.synchronizedCollection and other methods that may
> wrap/delagete to collections from other modules?
Good question, I missed this point. I think I should provide a helper method to
check whether the collection is tr
On 27/01/2023 05:42, Glavo wrote:
I analyzed the usage of toLowerCase and toUpperCase in OpenJDK more
carefully,
and found that none of the use cases really expected locale-sensitive
behavior
I expected that as there were a number of passes over these use-sites
over the years. That said, if
Hello,
during a PenTest we found a ReDos issue in the JRE which causes
Matcher.matches() to go into an endless loop. Is such an issue considered a
bug for the JDK team (aka should I file a bug report)? Or is such an issue
considered "by design"?
The issue appears in current JRE versions (tested w
On Thu, 26 Jan 2023 22:27:36 GMT, Mandy Chung wrote:
>> Currently, a `Lookup` object with `PACKAGE` access can be used to inject a
>> class in the runtime package of the Lookup's lookup class via
>> `Lookup::defineClass`. The classes that are injected have the same access
>> as other members
On Thu, 26 Jan 2023 06:46:16 GMT, Glavo wrote:
> I checked the `java.base` module, and all the `Collection#toArray()` method
> of collections be implemented correctly.
>
> Their return values can be trusted, so many unnecessary array duplication can
> be eliminated.
What about Collections.syn
Hello, Remi!
> Given that the semantics of NaN is clearly defined for Math.max/min (if one
> of the values is NaN the result is NaN),
> I don't believe we need a special case here for NaN.
>
> The semantics should be, this is equivalent to execute
> Math.max(min, Math.min(max, value))
>
> So cl
Hello, all!
Thank you for an interesting discussion. As I see some interest
towards this feature, I've created a new issue to track this:
https://bugs.openjdk.org/browse/JDK-8301226
I haven't found an exact duplicate, only an issue with related
discussion JDK-4466549. Feel free to link duplicates
On Fri, 27 Jan 2023 10:16:56 GMT, Matthias Baesken wrote:
>> test/jdk/jdk/internal/vm/Continuation/Fuzz.java line 95:
>>
>>> 93: }
>>> 94: if (Platform.isPPC()) {
>>> 95: COMPILATION_TIMEOUT = COMPILATION_TIMEOUT * 2;
>>
>> I guess this won't compile. COMPILATION_TIM
On Fri, 27 Jan 2023 10:20:26 GMT, Matthias Baesken wrote:
>> On our Linux ppc64le test machines we quite often see compilation timeouts
>> in the test jdk/internal/vm/Continuation/Fuzz.java.
>> (especially when running with fastdebug binaries)
>> So it probably makes sense to use a higher compil
On Fri, 27 Jan 2023 10:07:31 GMT, Richard Reingruber wrote:
>> Matthias Baesken has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Do not limit to Linux, handle all PPC platforms
>
> test/jdk/jdk/internal/vm/Continuation/Fuzz.java line 95:
> On our Linux ppc64le test machines we quite often see compilation timeouts in
> the test jdk/internal/vm/Continuation/Fuzz.java.
> (especially when running with fastdebug binaries)
> So it probably makes sense to use a higher compilation timeout (maybe factor
> 2) on this platform.
Matthias Ba
On Fri, 27 Jan 2023 08:52:21 GMT, Matthias Baesken wrote:
>> On our Linux ppc64le test machines we quite often see compilation timeouts
>> in the test jdk/internal/vm/Continuation/Fuzz.java.
>> (especially when running with fastdebug binaries)
>> So it probably makes sense to use a higher compil
On Thu, 26 Jan 2023 10:05:28 GMT, Sergey Tsypanov wrote:
> > it is necessary to copy the elements to a larger new array
>
> Right, I missed this is addAll() method. Btw, in this class you could do
> similar optimization in constructor as well.
Just now, I have pushed some updates and used simi
On Thu, 26 Jan 2023 10:01:21 GMT, Glavo wrote:
> it is necessary to copy the elements to a larger new array
Right, I missed this is addAll() method. Btw, in this class you could do
similar optimization in constructor as well.
-
PR: https://git.openjdk.org/jdk/pull/12212
On Fri, 27 Jan 2023 09:35:00 GMT, Sergey Tsypanov wrote:
> @Glavo I've filed https://bugs.openjdk.org/browse/JDK-8301220 so you can use
> it for this PR.
Thank you!
> I think as soon as we anyway assign the array from trusted collection, we
> don't need `len == 0` check here any more
I think
On Thu, 26 Jan 2023 06:46:16 GMT, Glavo wrote:
> I checked the `java.base` module, and all the `Collection#toArray()` method
> of collections be implemented correctly.
>
> Their return values can be trusted, so many unnecessary array duplication can
> be eliminated.
You could also have a look
I checked the `java.base` module, and all the `Collection#toArray()` method of
collections be implemented correctly.
Their return values can be trusted, so many unnecessary array duplication can
be eliminated.
-
Commit messages:
- fix checkstyle
- Update ImmutableCollections
- M
On Fri, 27 Jan 2023 08:41:12 GMT, Richard Reingruber wrote:
>> Matthias Baesken has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Do not limit to Linux, handle all PPC platforms
>
> test/jdk/jdk/internal/vm/Continuation/Fuzz.java line 94:
> On our Linux ppc64le test machines we quite often see compilation timeouts in
> the test jdk/internal/vm/Continuation/Fuzz.java.
> (especially when running with fastdebug binaries)
> So it probably makes sense to use a higher compilation timeout (maybe factor
> 2) on this platform.
Matthias Ba
On Fri, 27 Jan 2023 08:33:32 GMT, Matthias Baesken wrote:
> On our Linux ppc64le test machines we quite often see compilation timeouts in
> the test jdk/internal/vm/Continuation/Fuzz.java.
> (especially when running with fastdebug binaries)
> So it probably makes sense to use a higher compilatio
On our Linux ppc64le test machines we quite often see compilation timeouts in
the test jdk/internal/vm/Continuation/Fuzz.java.
(especially when running with fastdebug binaries)
So it probably makes sense to use a higher compilation timeout (maybe factor 2)
on this platform.
-
Commit
Hello.
I've noticed that ConcurrentModificationException javadoc has a "See
Also" section which contains links to legacy collections: Vector,
Hashtable, LinkedList.
https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/util/ConcurrentModificationException.html
I wonder if it makes sense
80 matches
Mail list logo