Re: RFR: 8260934: java/lang/StringBuilder/HugeCapacity.java fails without Compact Strings

2021-02-09 Thread Aleksey Shipilev
On Tue, 2 Feb 2021 15:38:01 GMT, Aleksey Shipilev wrote: > $ CONF=linux-x86_64-server-fastdebug make run-test > TEST=java/lang/StringBuilder/HugeCapacity.java > TEST_VM_OPTS=-XX:-CompactStrings > > STDERR: > java.lang.OutOfMemoryError: Required length exceeds implementation limit > at >

Re: RFR: JDK-8261237: remove isClassPathAttributePresent method [v2]

2021-02-09 Thread Aleksey Shipilev
On Tue, 9 Feb 2021 08:30:54 GMT, Matthias Baesken wrote: >> Hello, >> Currently in jdk/internal/vm/VMSupport.java , we create a JarFile without a >> related finally clause or try with resources. That should better be changed. >> See also the Sonar check result : >> >>

Re: RFR: 8261298: LinuxPackage.c, getJvmLauncherLibPath RPM->DEB typo

2021-02-09 Thread Aleksey Shipilev
On Tue, 9 Feb 2021 00:20:25 GMT, Alexander Matveev wrote: >> SonarCloud instance reports as new warning after JDK-8254702: >> >> This branch can not be reached because the condition duplicates a previous >> condition in the same sequence of "if/else if" statements. >> >> char*

Re: RFR: 8261300: jpackage: rewrite while(0)/while(false) to proper blocks [v3]

2021-02-09 Thread Aleksey Shipilev
> After JDK-8254702, SonarCloud instance complains about blocks like these: > "Change this loop body so that it can be executed more than once." > > int initJvmlLauncherData(JvmlLauncherData* ptr) const { > // Store path to JLI library just behind JvmlLauncherData header. >

Re: RFR: JDK-8261237: isClassPathAttributePresent use try with resources with JarFile [v2]

2021-02-09 Thread Matthias Baesken
> Hello, > Currently in jdk/internal/vm/VMSupport.java , we create a JarFile without a > related finally clause or try with resources. That should better be changed. > See also the Sonar check result : > >

Re: RFR: JDK-8261237: isClassPathAttributePresent use try with resources with JarFile [v2]

2021-02-09 Thread Matthias Baesken
On Mon, 8 Feb 2021 16:41:44 GMT, Claes Redestad wrote: >> Seems you're right. My search for "isClassPathAttributePresent" also didn't >> yield anything. So why not remove it altogether...? > > Removing it sounds good. hi, I removed isClassPathAttributePresent . - PR:

Re: RFR: 8261299: Use-after-free on failure path in LinuxPackage.c, getJvmLauncherLibPath

2021-02-09 Thread Aleksey Shipilev
On Mon, 8 Feb 2021 10:34:06 GMT, Thomas Stuefe wrote: >> SonarCloud instance reports a new warning after JDK-8254702: >> "Use of memory after it is freed" >> >> char* getJvmLauncherLibPath(void) { >>... >> popenStatus = popenCommand(pkgQueryCmd, pkg->name, findLauncherLib, >>

Re: RFR: JDK-8261237: isClassPathAttributePresent use try with resources with JarFile [v2]

2021-02-09 Thread Claes Redestad
On Tue, 9 Feb 2021 08:30:54 GMT, Matthias Baesken wrote: >> Hello, >> Currently in jdk/internal/vm/VMSupport.java , we create a JarFile without a >> related finally clause or try with resources. That should better be changed. >> See also the Sonar check result : >> >>

Re: RFR: JDK-8261237: remove isClassPathAttributePresent method [v2]

2021-02-09 Thread Christoph Langer
On Tue, 9 Feb 2021 08:30:54 GMT, Matthias Baesken wrote: >> Hello, >> Currently in jdk/internal/vm/VMSupport.java , we create a JarFile without a >> related finally clause or try with resources. That should better be changed. >> See also the Sonar check result : >> >>

Re: RFR: JDK-8261237: remove isClassPathAttributePresent method [v2]

2021-02-09 Thread Alan Bateman
On Tue, 9 Feb 2021 08:30:54 GMT, Matthias Baesken wrote: >> Hello, >> Currently in jdk/internal/vm/VMSupport.java , we create a JarFile without a >> related finally clause or try with resources. That should better be changed. >> See also the Sonar check result : >> >>

Re: RFR: 8261418: Reduce decoder creation overheads for sun.nio.cs.ext Charsets

2021-02-09 Thread Naoto Sato
On Tue, 9 Feb 2021 12:54:12 GMT, Claes Redestad wrote: > This refactor some `sun.nio.cs.ext` charsets, such as ISO-2022-CN-GB, > ISO-2022-CN-CNS, ISO-2022-KR and a few others to use static rather than > per-instance auxiliary decoders. Doing so reduce overheads of calling >

Re: RFR: 8260934: java/lang/StringBuilder/HugeCapacity.java fails without Compact Strings

2021-02-09 Thread Ioi Lam
On Tue, 9 Feb 2021 17:56:15 GMT, Aleksey Shipilev wrote: > > There's an existing test that explicitly tests both `-XX:+CompactStrings` > > and `-XX:-CompactStrings`. Maybe we can do the same thing? > > No, I don't think we can. In other tests, the conflict between > `-XX:+CompactStrings` and

Re: RFR: 8261300: jpackage: rewrite while(0)/while(false) to proper blocks [v2]

2021-02-09 Thread Aleksey Shipilev
On Tue, 9 Feb 2021 00:06:19 GMT, Alexander Matveev wrote: >> Aleksey Shipilev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> More cleanup in tstrings.cpp > > Marked as reviewed by almatvee (Committer). I had to redo `tstrings.cpp` to

Re: RFR: 8261299: Use-after-free on failure path in LinuxPackage.c, getJvmLauncherLibPath

2021-02-09 Thread Aleksey Shipilev
On Tue, 9 Feb 2021 15:58:36 GMT, Andy Herrick wrote: >> SonarCloud instance reports a new warning after JDK-8254702: >> "Use of memory after it is freed" >> >> char* getJvmLauncherLibPath(void) { >>... >> popenStatus = popenCommand(pkgQueryCmd, pkg->name, findLauncherLib, >>

Integrated: 8261299: Use-after-free on failure path in LinuxPackage.c, getJvmLauncherLibPath

2021-02-09 Thread Aleksey Shipilev
On Mon, 8 Feb 2021 09:05:23 GMT, Aleksey Shipilev wrote: > SonarCloud instance reports a new warning after JDK-8254702: > "Use of memory after it is freed" > > char* getJvmLauncherLibPath(void) { >... > popenStatus = popenCommand(pkgQueryCmd, pkg->name, findLauncherLib, >

JEP draft: Use UTF-8 as default Charset

2021-02-09 Thread Naoto Sato
Hello, We are planning to implement the following JEP draft: https://openjdk.java.net/jeps/8187041 This is a long-standing issue that has been causing cross-platform default encoding problems. Now that UTF-8 has increasingly become the de-facto character set out there, we believe it is high

Re: RFR: 8260934: java/lang/StringBuilder/HugeCapacity.java fails without Compact Strings

2021-02-09 Thread Aleksey Shipilev
On Tue, 9 Feb 2021 16:47:14 GMT, Ioi Lam wrote: > Having two `@test` blocks makes the maintenance more difficult. I had to do a > diff to find out the difference between the two blocks. > > There's an existing test that explicitly tests both `-XX:+CompactStrings` and > `-XX:-CompactStrings`.

Integrated: 8261209: isStandalone property: remove dependency on pretty-print

2021-02-09 Thread Joe Wang
On Sat, 6 Feb 2021 00:38:15 GMT, Joe Wang wrote: > A quick fix to remove isStandalone's dependency on pretty-print. This pull request has now been integrated. Changeset: 7c565f8b Author:Joe Wang URL: https://git.openjdk.java.net/jdk/commit/7c565f8b Stats: 36 lines in 3 files

Re: RFR: 8261123: Augment discussion of equivalence classes in Object.equals and comparison methods

2021-02-09 Thread Daniel Fuchs
On Tue, 9 Feb 2021 06:42:26 GMT, Joe Darcy wrote: > A follow-up of sorts to JDK-8257086, this change aims to improve the > discussion of the relationship between Object.equals and compareTo and > compare methods. The not-consistent-with-equals natural ordering of > BigDecimal get more

Re: RFR: 8261418: Reduce decoder creation overheads for sun.nio.cs.ext Charsets

2021-02-09 Thread Claes Redestad
On Tue, 9 Feb 2021 19:14:09 GMT, Naoto Sato wrote: >> This refactor some `sun.nio.cs.ext` charsets, such as ISO-2022-CN-GB, >> ISO-2022-CN-CNS, ISO-2022-KR and a few others to use static rather than >> per-instance auxiliary decoders. Doing so reduce overheads of calling >>

Re: RFR: 8260934: java/lang/StringBuilder/HugeCapacity.java fails without Compact Strings

2021-02-09 Thread Aleksey Shipilev
On Tue, 9 Feb 2021 19:28:27 GMT, Ioi Lam wrote: > The VM options specified by the `@test` line are appended after the options > specified by `-vmoptions`. So this test is executed in two different > configurations (not twice in the same configuration). Right, okay, so the last option wins,

Re: RFR: 8260934: java/lang/StringBuilder/HugeCapacity.java fails without Compact Strings [v2]

2021-02-09 Thread Aleksey Shipilev
> $ CONF=linux-x86_64-server-fastdebug make run-test > TEST=java/lang/StringBuilder/HugeCapacity.java > TEST_VM_OPTS=-XX:-CompactStrings > > STDERR: > java.lang.OutOfMemoryError: Required length exceeds implementation limit > at >

Re: RFR: 8261418: Reduce decoder creation overheads for sun.nio.cs.ext Charsets

2021-02-09 Thread Naoto Sato
On Tue, 9 Feb 2021 19:43:06 GMT, Claes Redestad wrote: >> src/jdk.charsets/share/classes/sun/nio/cs/ext/EUC_JP.java.template line 116: >> >>> 114: int sp = src.arrayOffset() + src.position(); >>> 115: int sl = src.arrayOffset() + src.limit(); >>> 116: >> >> I see these

Re: RFR: 8260934: java/lang/StringBuilder/HugeCapacity.java fails without Compact Strings [v2]

2021-02-09 Thread Ioi Lam
On Tue, 9 Feb 2021 19:48:07 GMT, Aleksey Shipilev wrote: >> $ CONF=linux-x86_64-server-fastdebug make run-test >> TEST=java/lang/StringBuilder/HugeCapacity.java >> TEST_VM_OPTS=-XX:-CompactStrings >> >> STDERR: >> java.lang.OutOfMemoryError: Required length exceeds implementation limit >> at

Re: RFR: 5023614: UUID needs methods to get most/leastSigBits and write to DataOutput

2021-02-09 Thread Richard Fussenegger
On Tue, 12 Jan 2021 07:26:44 GMT, Richard Fussenegger wrote: >> Requested feedback on the API addition/modifications: >> https://mail.openjdk.java.net/pipermail/core-libs-dev/2020-December/072530.html > > Active Active - PR: https://git.openjdk.java.net/jdk/pull/1465

Integrated: JDK-8261237: remove isClassPathAttributePresent method

2021-02-09 Thread Matthias Baesken
On Fri, 5 Feb 2021 15:23:59 GMT, Matthias Baesken wrote: > Hello, > Currently in jdk/internal/vm/VMSupport.java , we create a JarFile without a > related finally clause or try with resources. That should better be changed. > See also the Sonar check result : > >

Re: RFR: 8198540: Dynalink leaks memory when generating type converters [v7]

2021-02-09 Thread Hannes Wallnöfer
On Sun, 10 Jan 2021 17:04:19 GMT, Attila Szegedi wrote: >> _(NB: For this leak to occur, an application needs to be either creating and >> discarding linkers frequently, or creating and discarding class loaders >> frequently while creating Dynalink type converters for classes in them. >>

Re: RFR: 8080272 Refactor I/O stream copying to use InputStream.transferTo/readAllBytes and Files.copy [v9]

2021-02-09 Thread Philippe Marschall
On Mon, 8 Feb 2021 20:58:01 GMT, Andrey Turbanov wrote: >> 8080272 Refactor I/O stream copying to use >> InputStream.transferTo/readAllBytes and Files.copy > > Andrey Turbanov has updated the pull request incrementally with one > additional commit since the last revision: > > 8080272:

RFR: 8260710: Inline and simplify String*::{coder, value, isLatin1} methods

2021-02-09 Thread Aleksey Shipilev
Since Compact Strings implementation, there are simple methods in String and StringBuilders: `coder()`, `value()`, `isLatin1()`. They are mostly there to capture `COMPACT_STRINGS` flag that would fold to "false" when compact strings are disabled with `-XX:-CompactStrings`. This was to

Re: RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v12]

2021-02-09 Thread Stefan Karlsson
On Fri, 5 Feb 2021 16:07:09 GMT, Anton Kozlov wrote: >> Please review the implementation of JEP 391: macOS/AArch64 Port. >> >> It's heavily based on existing ports to linux/aarch64, macos/x86_64, and >> windows/aarch64. >> >> Major changes are in: >> * src/hotspot/cpu/aarch64: support of the

Re: RFR: 8261418: Reduce decoder creation overheads for sun.nio.cs.ext Charsets

2021-02-09 Thread Claes Redestad
On Tue, 9 Feb 2021 12:54:12 GMT, Claes Redestad wrote: > This refactor some `sun.nio.cs.ext` charsets, such as ISO-2022-CN-GB, > ISO-2022-CN-CNS, ISO-2022-KR and a few others to use static rather than > per-instance auxiliary decoders. Doing so reduce overheads of calling >

RFR: 8261418: Reduce decoder creation overheads for sun.nio.cs.ext Charsets

2021-02-09 Thread Claes Redestad
This refactor some `sun.nio.cs.ext` charsets, such as ISO-2022-CN-GB, ISO-2022-CN-CNS, ISO-2022-KR and a few others to use static rather than per-instance auxiliary decoders. Doing so reduce overheads of calling `charset.newDecoder()`. This reduce or eliminate regressions on `new

Re: RFR: 8260710: Inline and simplify String*::{coder, value, isLatin1} methods

2021-02-09 Thread Claes Redestad
On Mon, 1 Feb 2021 13:11:52 GMT, Aleksey Shipilev wrote: > Since Compact Strings implementation, there are simple methods in String and > StringBuilders: `coder()`, `value()`, `isLatin1()`. They are mostly there to > capture `COMPACT_STRINGS` flag that would fold to "false" when compact >

Re: RFR: 8254001: [Metrics] Enhance parsing of cgroup interface files for version detection

2021-02-09 Thread Severin Gehwolf
On Mon, 1 Feb 2021 20:26:54 GMT, Andrew John Hughes wrote: > > Anybody willing to review this? > > I can have a go. > > I have two main concerns: > > 1. There seems to be little documentation on the new additions. I'm > particularly concerned about things like CgroupV1Subsystem.java

Re: RFR: JDK-8261422: Adjust problematic String.format calls in jdk/internal/util/Preconditions.java outOfBoundsMessage

2021-02-09 Thread Matthias Baesken
On Tue, 9 Feb 2021 14:33:22 GMT, Matthias Baesken wrote: > JDK-8261422: Adjust problematic String.format calls in > jdk/internal/util/Preconditions.java outOfBoundsMessage The method outOfBoundsMessage has a few problematic calls to String.format. Those calls use "%d" however the arguments are

RFR: JDK-8261422: Adjust problematic String.format calls in jdk/internal/util/Preconditions.java outOfBoundsMessage

2021-02-09 Thread Matthias Baesken
JDK-8261422: Adjust problematic String.format calls in jdk/internal/util/Preconditions.java outOfBoundsMessage - Commit messages: - JDK-8261422 Changes: https://git.openjdk.java.net/jdk/pull/2483/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk=2483=00 Issue:

Re: RFR: 4926314: Optimize Reader.read(CharBuffer) [v3]

2021-02-09 Thread Philippe Marschall
On Tue, 5 Jan 2021 18:10:52 GMT, Brian Burkhalter wrote: >> Philippe Marschall has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Update copyright years > > src/java.base/share/classes/java/io/Reader.java line 198: > >> 196: }

Re: RFR: 8254001: [Metrics] Enhance parsing of cgroup interface files for version detection [v4]

2021-02-09 Thread Severin Gehwolf
> This is an enhancement which solves two issues: > > 1. Multiple reads of relevant cgroup interface files. Now interface files are > only read once per file (just like Hotspot). > 2. Proxies creation of the impl specific subsystem via `determineType()` as > before, but now reads all relevant

Re: RFR: 8260710: Inline and simplify String*::{coder, value, isLatin1} methods

2021-02-09 Thread Roger Riggs
Hi, It would be useful to drive a discussion of removing fallback provided by COMPACT_STRINGS  entirely. It was retained initially as a hedge against bugs in the new implementation. It adds complexity to the implementation and can hide implementation bugs. Regards, Roger On 2/9/21 7:50 AM,

Re: RFR: 8260337: Optimize ImageReader lookup, used by Class.getResource [v2]

2021-02-09 Thread Athijegannathan Sundararajan
On Mon, 25 Jan 2021 16:09:01 GMT, Claes Redestad wrote: >> This patch optimizes the code paths exercised by >> `String.class.getResource("String.class")` by: >> >> - Adding an ASCII fast-path to methods verifying strings in the jimage, >> which can then be done allocation-free >> - Avoiding

Re: RFR: JDK-8261422: Adjust problematic String.format calls in jdk/internal/util/Preconditions.java outOfBoundsMessage

2021-02-09 Thread Alan Bateman
On Tue, 9 Feb 2021 14:33:22 GMT, Matthias Baesken wrote: > JDK-8261422: Adjust problematic String.format calls in > jdk/internal/util/Preconditions.java outOfBoundsMessage src/java.base/share/classes/jdk/internal/util/Preconditions.java line 212: > 210:

Re: RFR: 8223188: Removed unnecessary #ifdef __cplusplus from .cpp sources [v2]

2021-02-09 Thread Alexey Semenyuk
On Tue, 9 Feb 2021 04:03:14 GMT, Ioi Lam wrote: > The Bug Synopsis of 'Consider rewriting in C++ or moving to ".c" files' is > unclear. > I would request that the Bug Synopsis to be changed to "removed unnecessary > #ifdef __cplusplus" before integrating this PR. Bug Synopsis updated as

Re: RFR: 8223188: Removed unnecessary #ifdef __cplusplus from .cpp sources [v2]

2021-02-09 Thread Alexey Semenyuk
> Remove needless `#ifdef __cplusplus` from .cpp sources Alexey Semenyuk 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 commit

Re: RFR: 8260934: java/lang/StringBuilder/HugeCapacity.java fails without Compact Strings

2021-02-09 Thread Ioi Lam
On Tue, 9 Feb 2021 09:20:45 GMT, Aleksey Shipilev wrote: >> $ CONF=linux-x86_64-server-fastdebug make run-test >> TEST=java/lang/StringBuilder/HugeCapacity.java >> TEST_VM_OPTS=-XX:-CompactStrings >> >> STDERR: >> java.lang.OutOfMemoryError: Required length exceeds implementation limit >> at

Re: RFR: 8223188: Removed unnecessary #ifdef __cplusplus from .cpp sources

2021-02-09 Thread Alexey Semenyuk
On Mon, 8 Feb 2021 22:26:22 GMT, Alexey Semenyuk wrote: > Remove needless `#ifdef __cplusplus` from .cpp sources > @alexeysemenyukoracle FYI, there was no need to force-push (or even push at > all) to your branch. It doesn't matter at all what the commit message(s) of > the commit(s) in the

Re: RFR: 8260710: Inline and simplify String*::{coder, value, isLatin1} methods

2021-02-09 Thread Ioi Lam
On Tue, 9 Feb 2021 13:06:36 GMT, Claes Redestad wrote: >> Since Compact Strings implementation, there are simple methods in String and >> StringBuilders: `coder()`, `value()`, `isLatin1()`. They are mostly there to >> capture `COMPACT_STRINGS` flag that would fold to "false" when compact >>

Integrated: 8260337: Optimize ImageReader lookup, used by Class.getResource

2021-02-09 Thread Claes Redestad
On Mon, 25 Jan 2021 00:05:52 GMT, Claes Redestad wrote: > This patch optimizes the code paths exercised by > `String.class.getResource("String.class")` by: > > - Adding an ASCII fast-path to methods verifying strings in the jimage, which > can then be done allocation-free > - Avoiding the

Re: RFR: 8260337: Optimize ImageReader lookup, used by Class.getResource [v2]

2021-02-09 Thread Claes Redestad
On Wed, 27 Jan 2021 18:22:54 GMT, Jim Laskey wrote: >> Claes Redestad has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Copyrights and rename containsLocation > > Nice clean up. LGTM @JimLaskey @sundararajana - thanks for reviewing!

Re: RFR: 8223188: Removed unnecessary #ifdef __cplusplus from .cpp sources [v2]

2021-02-09 Thread Ioi Lam
On Tue, 9 Feb 2021 15:46:55 GMT, Alexey Semenyuk wrote: >> Remove needless `#ifdef __cplusplus` from .cpp sources > > Alexey Semenyuk has refreshed the contents of this pull request, and previous > commits have been removed. The incremental views will show differences > compared to the

Re: RFR: JDK-8261422: Adjust problematic String.format calls in jdk/internal/util/Preconditions.java outOfBoundsMessage

2021-02-09 Thread stefan-zobel
On Tue, 9 Feb 2021 15:47:39 GMT, Matthias Baesken wrote: >> src/java.base/share/classes/jdk/internal/util/Preconditions.java line 212: >> >>> 210: args.get(0), args.get(1), >>> args.get(2)); >>> 211: case "checkFromIndexSize": >>> 212:

Re: RFR: 8223188: Removed unnecessary #ifdef __cplusplus from .cpp sources

2021-02-09 Thread Kevin Rushforth
On Mon, 8 Feb 2021 22:26:22 GMT, Alexey Semenyuk wrote: > Remove needless `#ifdef __cplusplus` from .cpp sources @alexeysemenyukoracle FYI, there was no need to force-push (or even push at all) to your branch. It doesn't matter at all what the commit message(s) of the commit(s) in the source

Integrated: 8261306: ServiceLoader documentation has malformed Unicode escape

2021-02-09 Thread Brian Burkhalter
On Tue, 9 Feb 2021 00:11:52 GMT, Brian Burkhalter wrote: > Please review this really small correction to the class level documentation > of `java.util.ServiceLoader`. This pull request has now been integrated. Changeset: f395ee0c Author:Brian Burkhalter URL:

Re: RFR: 4926314: Optimize Reader.read(CharBuffer) [v5]

2021-02-09 Thread Philippe Marschall
On Fri, 5 Feb 2021 22:08:17 GMT, Brian Burkhalter wrote: >> Philippe Marschall has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Limit amount read to avoid BufferOverflowException >> >> - limit the amount read >> - add tests > >

Re: RFR: 8252971: WindowsFileAttributes does not know about Unix domain sockets [v7]

2021-02-09 Thread Alan Bateman
On Mon, 8 Feb 2021 22:54:56 GMT, Michael McMahon wrote: >> Could I get the following change reviewed please? It fixes a problem (in >> JEP380) on Windows where some file operations on Unix domain sockets were >> not working and led to the feature being disabled on Windows 2019 Server in >>

Integrated: 8261096: Convert jlink tool to use Stream.toList()

2021-02-09 Thread Ian Graves
On Thu, 4 Feb 2021 22:45:10 GMT, Ian Graves wrote: > A subtask [JDK-8260559](https://bugs.openjdk.java.net/browse/JDK-8260559). > This is an enhancement to update jlink's usage of `Collections.toList()` to > `Stream.toList()`. This pull request has now been integrated. Changeset: edd5fc88

Re: RFR: JDK-8261422: Adjust problematic String.format calls in jdk/internal/util/Preconditions.java outOfBoundsMessage

2021-02-09 Thread Matthias Baesken
On Tue, 9 Feb 2021 15:38:29 GMT, Alan Bateman wrote: >> JDK-8261422: Adjust problematic String.format calls in >> jdk/internal/util/Preconditions.java outOfBoundsMessage > > src/java.base/share/classes/jdk/internal/util/Preconditions.java line 212: > >> 210:

Re: RFR: 8261299: Use-after-free on failure path in LinuxPackage.c, getJvmLauncherLibPath

2021-02-09 Thread Andy Herrick
On Mon, 8 Feb 2021 09:05:23 GMT, Aleksey Shipilev wrote: > SonarCloud instance reports a new warning after JDK-8254702: > "Use of memory after it is freed" > > char* getJvmLauncherLibPath(void) { >... > popenStatus = popenCommand(pkgQueryCmd, pkg->name, findLauncherLib, >

Integrated: 8261279: sun/util/resources/cldr/TimeZoneNamesTest.java timed out

2021-02-09 Thread Naoto Sato
On Mon, 8 Feb 2021 21:42:36 GMT, Naoto Sato wrote: > Please review this simple test case fix. By sampling locales to test, it > reduces the possibility of the time out. This pull request has now been integrated. Changeset: becee643 Author:Naoto Sato URL:

Re: RFR: 4926314: Optimize Reader.read(CharBuffer) [v6]

2021-02-09 Thread Philippe Marschall
> Implement three optimiztations for Reader.read(CharBuffer) > > * Add a code path for heap buffers in Reader#read to use the backing array > instead of allocating a new one. > * Change the code path for direct buffers in Reader#read to limit the > intermediate allocation to

Re: RFR: 8198540: Dynalink leaks memory when generating type converters [v7]

2021-02-09 Thread Attila Szegedi
On Tue, 9 Feb 2021 10:57:05 GMT, Hannes Wallnöfer wrote: >> Attila Szegedi has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Rename ClassLoaderRelation to RetentionDirection; it is better >> self-documenting this way. > > Nice work as

Integrated: 8198540: Dynalink leaks memory when generating type converters

2021-02-09 Thread Attila Szegedi
On Sat, 2 Jan 2021 14:45:51 GMT, Attila Szegedi wrote: > _(NB: For this leak to occur, an application needs to be either creating and > discarding linkers frequently, or creating and discarding class loaders > frequently while creating Dynalink type converters for classes in them. > Neither

Re: RFR: 8261123: Augment discussion of equivalence classes in Object.equals and comparison methods

2021-02-09 Thread Joe Darcy
On Tue, 9 Feb 2021 18:51:33 GMT, Daniel Fuchs wrote: >> A follow-up of sorts to JDK-8257086, this change aims to improve the >> discussion of the relationship between Object.equals and compareTo and >> compare methods. The not-consistent-with-equals natural ordering of >> BigDecimal get more

Re: RFR: 8261123: Augment discussion of equivalence classes in Object.equals and comparison methods [v2]

2021-02-09 Thread Joe Darcy
> A follow-up of sorts to JDK-8257086, this change aims to improve the > discussion of the relationship between Object.equals and compareTo and > compare methods. The not-consistent-with-equals natural ordering of > BigDecimal get more explication too. While updating Object, I added some uses

Re: RFR: 8261123: Augment discussion of equivalence classes in Object.equals and comparison methods [v2]

2021-02-09 Thread Joe Darcy
On Tue, 9 Feb 2021 18:55:52 GMT, Daniel Fuchs wrote: >> Joe Darcy has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix typos found in code review. > > src/java.base/share/classes/java/math/BigDecimal.java line 91: > >> 89: * used in

Re: RFR: 8261418: Reduce decoder creation overheads for sun.nio.cs.ext Charsets

2021-02-09 Thread Claes Redestad
On Tue, 9 Feb 2021 19:19:18 GMT, Naoto Sato wrote: >> This refactor some `sun.nio.cs.ext` charsets, such as ISO-2022-CN-GB, >> ISO-2022-CN-CNS, ISO-2022-KR and a few others to use static rather than >> per-instance auxiliary decoders. Doing so reduce overheads of calling >>

Re: RFR: 8261418: Reduce decoder creation overheads for sun.nio.cs.ext Charsets [v2]

2021-02-09 Thread Claes Redestad
On Tue, 9 Feb 2021 19:18:04 GMT, Naoto Sato wrote: >> Claes Redestad has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Review fixes > > src/jdk.charsets/share/classes/sun/nio/cs/ext/ISO2022.java line 64: > >> 62: >> 63:

Re: RFR: 8261418: Reduce decoder creation overheads for sun.nio.cs.ext Charsets [v2]

2021-02-09 Thread Claes Redestad
> This refactor some `sun.nio.cs.ext` charsets, such as ISO-2022-CN-GB, > ISO-2022-CN-CNS, ISO-2022-KR and a few others to use static rather than > per-instance auxiliary decoders. Doing so reduce overheads of calling > `charset.newDecoder()`. This reduce or eliminate regressions on `new >

Re: RFR: 8261418: Reduce decoder creation overheads for sun.nio.cs.ext Charsets [v2]

2021-02-09 Thread Naoto Sato
On Tue, 9 Feb 2021 21:10:18 GMT, Claes Redestad wrote: >> src/jdk.charsets/share/classes/sun/nio/cs/ext/ISO2022.java line 64: >> >>> 62: >>> 63: protected final byte maximumDesignatorLength = 4; >>> 64: >> >> This implementation moved to KR concrete implementation class. IIUC, this

Re: RFR: 8259267: Refactor LoaderLeak shell test as java test. [v5]

2021-02-09 Thread Igor Ignatyev
On Mon, 8 Feb 2021 20:12:03 GMT, Ivan Šipka wrote: >> Refactor `test/jdk/java/lang/annotation/loaderLeak/LoaderLeak.sh` as java >> test. > > Ivan Šipka has updated the pull request with a new target base due to a merge > or a rebase. The pull request now contains four commits: > > - 8166026:

Re: RFR: 8259267: Refactor LoaderLeak shell test as java test. [v3]

2021-02-09 Thread Igor Ignatyev
On Fri, 11 Dec 2020 13:39:04 GMT, Igor Ignatyev wrote: >> Ivan Šipka has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8166026: Refactor java/lang shell tests to java > > test/jdk/java/lang/annotation/LoaderLeakTest.java line 64: > >>

Integrated: 8223188: Removed unnecessary #ifdef __cplusplus from .cpp sources

2021-02-09 Thread Alexey Semenyuk
On Mon, 8 Feb 2021 22:26:22 GMT, Alexey Semenyuk wrote: > Remove needless `#ifdef __cplusplus` from .cpp sources This pull request has now been integrated. Changeset: 699a3cde Author:Alexey Semenyuk URL: https://git.openjdk.java.net/jdk/commit/699a3cde Stats: 10 lines in 2 files

Re: RFR: 8261300: jpackage: rewrite while(0)/while(false) to proper blocks [v3]

2021-02-09 Thread Alexey Semenyuk
On Tue, 9 Feb 2021 08:58:23 GMT, Aleksey Shipilev wrote: >> After JDK-8254702, SonarCloud instance complains about blocks like these: >> "Change this loop body so that it can be executed more than once." >> >> int initJvmlLauncherData(JvmlLauncherData* ptr) const { >> // Store path

Jpackage GraalVM OS X

2021-02-09 Thread Michael Hall
This appears to no longer work at all as a included JRE With… --runtime-image /Library/Java/JavaVirtualMachines/graalvm-ce-java11-21.0.0/Contents/Home \ It fails to launch. Launch CLI outFastR/FastRGraalHP.app/Contents/MacOS/FastRGraalHP Failed to find JVM in

Re: RFR: 8261123: Augment discussion of equivalence classes in Object.equals and comparison methods [v3]

2021-02-09 Thread Joe Darcy
On Tue, 9 Feb 2021 19:41:25 GMT, Brian Burkhalter wrote: >> Joe Darcy has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix typos in javadoc tags found during review. > > src/java.base/share/classes/java/lang/Object.java line 148: > >>

Re: RFR: 8261449: Micro-optimize JVM_LatestUserDefinedLoader

2021-02-09 Thread David Holmes
On Tue, 9 Feb 2021 15:40:03 GMT, Aleksey Shipilev wrote: > `JVM_LatestUserDefinedLoader` is called normally from > `ObjectInputStream.resolveClass` -> `VM.latestUserDefinedLoader0`. And it > takes a measurable time to walk the stack. There is JDK-8173368 that wants to > replace it with

Re: RFR: 8261123: Augment discussion of equivalence classes in Object.equals and comparison methods [v3]

2021-02-09 Thread Joe Darcy
> A follow-up of sorts to JDK-8257086, this change aims to improve the > discussion of the relationship between Object.equals and compareTo and > compare methods. The not-consistent-with-equals natural ordering of > BigDecimal get more explication too. While updating Object, I added some uses

Re: RFR: 8261123: Augment discussion of equivalence classes in Object.equals and comparison methods [v3]

2021-02-09 Thread Brian Burkhalter
On Wed, 10 Feb 2021 01:49:55 GMT, Joe Darcy wrote: >> A follow-up of sorts to JDK-8257086, this change aims to improve the >> discussion of the relationship between Object.equals and compareTo and >> compare methods. The not-consistent-with-equals natural ordering of >> BigDecimal get more

Re: RFR: 8261123: Augment discussion of equivalence classes in Object.equals and comparison methods [v3]

2021-02-09 Thread Brian Burkhalter
On Wed, 10 Feb 2021 01:55:24 GMT, Joe Darcy wrote: >> src/java.base/share/classes/java/math/BigDecimal.java line 3062: >> >>> 3060: >>> 3061: * @apiNote >>> 3062: * Note: this class has a natural ordering that is inconsistent >>> with equals. >> >> Is `Note: ` really needed? > >

Re: RFR: 8261123: Augment discussion of equivalence classes in Object.equals and comparison methods [v2]

2021-02-09 Thread Brian Burkhalter
On Tue, 9 Feb 2021 20:27:52 GMT, Joe Darcy wrote: >> A follow-up of sorts to JDK-8257086, this change aims to improve the >> discussion of the relationship between Object.equals and compareTo and >> compare methods. The not-consistent-with-equals natural ordering of >> BigDecimal get more

Re: RFR: 8261449: Micro-optimize JVM_LatestUserDefinedLoader [v2]

2021-02-09 Thread Aleksey Shipilev
> `JVM_LatestUserDefinedLoader` is called normally from > `ObjectInputStream.resolveClass` -> `VM.latestUserDefinedLoader0`. And it > takes a measurable time to walk the stack. There is JDK-8173368 that wants to > replace it with `StackWalker`, but we can tune up the >

Re: RFR: 8261449: Micro-optimize JVM_LatestUserDefinedLoader [v2]

2021-02-09 Thread Aleksey Shipilev
On Wed, 10 Feb 2021 01:29:51 GMT, David Holmes wrote: >> Aleksey Shipilev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Added a comment > > src/hotspot/share/prims/jvm.cpp line 3293: > >> 3291: oop loader = ik->class_loader(); >>

Re: RFR: 8252971: WindowsFileAttributes does not know about Unix domain sockets [v8]

2021-02-09 Thread Michael McMahon
> Could I get the following change reviewed please? It fixes a problem (in > JEP380) on Windows where some file operations on Unix domain sockets were not > working and led to the feature being disabled on Windows 2019 Server in JDK > 16. So, the fix re-enables the feature on all versions of

Re: RFR: 8252971: WindowsFileAttributes does not know about Unix domain sockets [v7]

2021-02-09 Thread Michael McMahon
On Tue, 9 Feb 2021 15:33:48 GMT, Alan Bateman wrote: >> Michael McMahon has updated the pull request incrementally with one >> additional commit since the last revision: >> >> update > > src/java.base/windows/classes/sun/nio/fs/WindowsPath.java line 840: > >> 838: throw e;

Re: RFR: 8261298: LinuxPackage.c, getJvmLauncherLibPath RPM->DEB typo

2021-02-09 Thread Aleksey Shipilev
On Tue, 9 Feb 2021 08:56:22 GMT, Aleksey Shipilev wrote: >> Marked as reviewed by almatvee (Committer). > > Ah. Still looking for formal Reviewer to ack. Still need formal Reviewer, preferably from jpackage. @andyherrick? - PR: https://git.openjdk.java.net/jdk/pull/2452

Integrated: 8260934: java/lang/StringBuilder/HugeCapacity.java fails without Compact Strings

2021-02-09 Thread Aleksey Shipilev
On Tue, 2 Feb 2021 15:38:01 GMT, Aleksey Shipilev wrote: > $ CONF=linux-x86_64-server-fastdebug make run-test > TEST=java/lang/StringBuilder/HugeCapacity.java > TEST_VM_OPTS=-XX:-CompactStrings > > STDERR: > java.lang.OutOfMemoryError: Required length exceeds implementation limit > at >