Re: RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available [v2]

2023-07-25 Thread Alan Bateman
On Wed, 26 Jul 2023 06:17:13 GMT, Vyom Tewari wrote: > If i am reading code correctly then with the new implementation, until client > issue the next "FIS.read" he may or may not know if there was exception > pending in previous 'read' call ?. > I am not sure in case of partial read we have sup

Re: RFR: 8295017: Remove Windows specific workaround in JLI_Snprintf [v5]

2023-07-25 Thread David Holmes
On Thu, 13 Oct 2022 14:48:29 GMT, Julian Waters wrote: >> The C99 snprintf is available with Visual Studio 2015 and above, alongside >> Windows 10 and the UCRT, and is no longer identical to the outdated Windows >> _snprintf. Since support for the Visual C++ 2017 compiler was removed a >> whil

Re: RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available [v2]

2023-07-25 Thread Vyom Tewari
On Tue, 25 Jul 2023 23:50:07 GMT, Brian Burkhalter wrote: >> Limit native memory allocation and move write loop from the native layer >> into Java. This change should make the OOME reported in the issue much less >> likely. > > Brian Burkhalter has updated the pull request incrementally with th

Re: RFR: 8295017: Remove Windows specific workaround in JLI_Snprintf [v5]

2023-07-25 Thread David Holmes
On Wed, 26 Jul 2023 04:31:13 GMT, Sergey Bylokhov wrote: >> Thank you! >> >>>If processing string specifier s, S, or Z, format specification processing >>>stops, a NULL is placed at the beginning of the buffer. >> >> I hope this is not an MS extension/implementation detail since I did not >>

Re: RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available [v2]

2023-07-25 Thread Vyom Tewari
On Tue, 25 Jul 2023 23:50:07 GMT, Brian Burkhalter wrote: >> Limit native memory allocation and move write loop from the native layer >> into Java. This change should make the OOME reported in the issue much less >> likely. > > Brian Burkhalter has updated the pull request incrementally with th

Re: RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available [v2]

2023-07-25 Thread Vyom Tewari
On Tue, 25 Jul 2023 23:50:07 GMT, Brian Burkhalter wrote: >> Limit native memory allocation and move write loop from the native layer >> into Java. This change should make the OOME reported in the issue much less >> likely. > > Brian Burkhalter has updated the pull request incrementally with th

Re: RFR: 8295017: Remove Windows specific workaround in JLI_Snprintf [v5]

2023-07-25 Thread Sergey Bylokhov
On Tue, 25 Jul 2023 23:51:34 GMT, Sergey Bylokhov wrote: >> Julian Waters 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 seven additional >> co

Re: RFR: 8295017: Remove Windows specific workaround in JLI_Snprintf [v5]

2023-07-25 Thread David Holmes
On Tue, 25 Jul 2023 23:51:34 GMT, Sergey Bylokhov wrote: > I hope this is not an MS extension/implementation detail since I did not find > this in any other places. @mrserb this change was to a Windows specific file. - PR Comment: https://git.openjdk.org/jdk/pull/10625#issuecommen

Re: RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available [v2]

2023-07-25 Thread Brian Burkhalter
On Tue, 25 Jul 2023 05:51:26 GMT, Alan Bateman wrote: >> It's based on micro-benchmarks. Having the loops in Java reduces throughput >> but allocating memory using `malloc(len)` also reduces throughput as `len` >> gets larger and this threshold appears to balance the two. > >> It's based on mic

Re: RFR: 8295017: Remove Windows specific workaround in JLI_Snprintf [v5]

2023-07-25 Thread Sergey Bylokhov
On Thu, 13 Oct 2022 14:48:29 GMT, Julian Waters wrote: >> The C99 snprintf is available with Visual Studio 2015 and above, alongside >> Windows 10 and the UCRT, and is no longer identical to the outdated Windows >> _snprintf. Since support for the Visual C++ 2017 compiler was removed a >> whil

Re: RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available [v2]

2023-07-25 Thread Brian Burkhalter
On Mon, 24 Jul 2023 13:04:56 GMT, Alan Bateman wrote: >> src/java.base/share/native/libjava/io_util.c line 99: >> >>> 97: return 0; >>> 98: } else if (len > BUF_SIZE) { >>> 99: if (len > MAX_MALLOC_SIZE) >> >> Hi Brian if I am reading code correctly then with the current cod

Re: RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available [v2]

2023-07-25 Thread Brian Burkhalter
> Limit native memory allocation and move write loop from the native layer into > Java. This change should make the OOME reported in the issue much less likely. Brian Burkhalter has updated the pull request incrementally with three additional commits since the last revision: - 6478546: Decreas

Re: RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available [v2]

2023-07-25 Thread Brian Burkhalter
On Tue, 25 Jul 2023 02:05:52 GMT, Brian Burkhalter wrote: >> src/java.base/share/classes/java/io/FileOutputStream.java line 366: >> >>> 364: int n = writeBytes(b, off, len, append); >>> 365: if (n == -1) >>> 366: break; >> >> Checking if n is

Re: RFR: 8295017: Remove Windows specific workaround in JLI_Snprintf [v3]

2023-07-25 Thread Julian Waters
On Tue, 25 Jul 2023 21:00:17 GMT, Sergey Bylokhov wrote: >> @dholmes-ora could I trouble you for a sponsor? Thanks! > > @TheShermanTanker Working on a similar cleanup, and wonder if is it correct > to assume that the "snprintf" adds "nul" even in case of error. > For example, this code was remov

Re: RFR: 8313023: Return value corrupted when using CCS + isTrivial (mainline)

2023-07-25 Thread Jorn Vernee
On Tue, 25 Jul 2023 19:17:38 GMT, Jorn Vernee wrote: > Port of: https://github.com/openjdk/panama-foreign/pull/848 from the > panama-foreign repo. > > Copying the PR body here for convenience: > > Due to a bug in the downcall linker stub generation, we don't save the return > value when captu

Re: RFR: 8311630: [s390] Implementation of Foreign Function & Memory API (Preview) [v3]

2023-07-25 Thread Jorn Vernee
On Sat, 8 Jul 2023 10:48:15 GMT, sid8606 wrote: >> Implementation of "Foreign Function & Memory API" for s390x (Big Endian). > > sid8606 has updated the pull request incrementally with one additional commit > since the last revision: > > Address suggestions from Jorn Vernee src/hotspot/cpu/s

Re: RFR: 8311653: Modify -XshowSettings launcher behavior [v2]

2023-07-25 Thread Mandy Chung
On Tue, 25 Jul 2023 19:47:16 GMT, Sean Coffey wrote: >> Modify the -XshowSettings launcher option to print non-verbose settings >> details of all components by default. Verbose settings details will be >> printed via the -XshowSettings:all option. Modify the -XshowSettings option >> to reject

Re: RFR: 8295017: Remove Windows specific workaround in JLI_Snprintf [v3]

2023-07-25 Thread Sergey Bylokhov
On Thu, 13 Oct 2022 14:34:25 GMT, Julian Waters wrote: >> Looks good. Thanks. > > @dholmes-ora could I trouble you for a sponsor? Thanks! @TheShermanTanker Working on a similar cleanup, and wonder if is it correct to assume that the "snprintf" adds "nul" even in case of error. For example, this

RFR: 8313023: Return value corrupted when using CCS + isTrivial (mainline)

2023-07-25 Thread Jorn Vernee
Port of: https://github.com/openjdk/panama-foreign/pull/848 from the panama-foreign repo. Copying the PR body here for convenience: Due to a bug in the downcall linker stub generation, we don't save the return value when capturing call state for trivial functions, and the return value gets cor

Integrated: 8312488: tools/jpackage/share/AppLauncherEnvTest.java fails with dynamically linked libstdc++

2023-07-25 Thread Vladimir Petko
On Fri, 21 Jul 2023 10:55:13 GMT, Vladimir Petko wrote: > Use the same approach as Logger::defaultLogger() to ensure that the appender > is not destroyed before shared object destructor function is executed. > > The alternative is to delete dcon() function, but we might run into a > similiar

Re: RFR: 8311653: Modify -XshowSettings launcher behavior

2023-07-25 Thread Sean Coffey
On Mon, 24 Jul 2023 16:00:52 GMT, Sean Coffey wrote: > Modify the -XshowSettings launcher option to print non-verbose settings > details of all components by default. Verbose settings details will be > printed via the -XshowSettings:all option. Modify the -XshowSettings option > to reject bad

Re: RFR: 8311653: Modify -XshowSettings launcher behavior [v2]

2023-07-25 Thread Sean Coffey
> Modify the -XshowSettings launcher option to print non-verbose settings > details of all components by default. Verbose settings details will be > printed via the -XshowSettings:all option. Modify the -XshowSettings option > to reject bad values passed to it. Print an error message in such sce

Re: RFR: 8306582: Remove MetaspaceShared::exit_after_static_dump()

2023-07-25 Thread Matias Saavedra Silva
On Thu, 13 Jul 2023 21:25:17 GMT, Matias Saavedra Silva wrote: > Currently we exit the VM after static dumping with > `MetaspaceShared::exit_after_static_dump()`. > > > // We have finished dumping the static archive. At this point, there may be > pending VM > // operations. We have change

Re: RFR: 8306582: Remove MetaspaceShared::exit_after_static_dump() [v2]

2023-07-25 Thread Matias Saavedra Silva
> Currently we exit the VM after static dumping with > `MetaspaceShared::exit_after_static_dump()`. > > > // We have finished dumping the static archive. At this point, there may be > pending VM > // operations. We have changed some global states (such as > vmClasses::_klasses) that > // m

Integrated: 8039165: [Doc] MessageFormat null locale generates NullPointerException

2023-07-25 Thread Justin Lu
On Mon, 17 Jul 2023 21:04:48 GMT, Justin Lu wrote: > Please review this PR and [CSR](https://bugs.openjdk.org/browse/JDK-8312197) > which updates the javadoc for the constructor of MessageFormat regarding a > `null` locale, > > `MessageFormat` when created with a `null` locale may throw a > `

Re: RFR: 8310813: Simplify and modernize equals, hashCode, and compareTo for BigInteger [v3]

2023-07-25 Thread Pavel Rappo
On Thu, 20 Jul 2023 15:32:09 GMT, Pavel Rappo wrote: >> Please review this PR to use modern APIs and language features to simplify >> equals, hashCode, and compareTo for BigInteger. If you have any performance >> concerns, please raise them. >> >> This PR is cherry-picked from a bigger, not-ye

Re: RFR: 8310813: Simplify and modernize equals, hashCode, and compareTo for BigInteger [v4]

2023-07-25 Thread Pavel Rappo
> Please review this PR to use modern APIs and language features to simplify > equals, hashCode, and compareTo for BigInteger. If you have any performance > concerns, please raise them. > > This PR is cherry-picked from a bigger, not-yet-published PR, to test the > waters. That latter PR will b

Re: RFR: 8288899: java/util/concurrent/ExecutorService/CloseTest.java failed with "InterruptedException: sleep interrupted"

2023-07-25 Thread Doug Lea
On Sat, 3 Jun 2023 14:08:02 GMT, Doug Lea wrote: > Addresses Jdk 8288899 : java/util/concurrent/ExecutorService/CloseTest.java > failed with "InterruptedException: sleep interrupted" and related issues. > > This is a major ForkJoin update (and hard to review -- sorry) that finally > addresses

Re: RFR: JDK-8311822: AIX : test/jdk/java/foreign/TestLayouts.java fails because of different output - expected [[i4](struct)] but found [[I4](struct)]

2023-07-25 Thread Per Minborg
On Tue, 25 Jul 2023 10:57:48 GMT, Matthias Baesken wrote: > > I put this patch into our internal test queue to see how it works on AIX. > > AIX tests are fine too. Great! Thanks for testing this! - PR Comment: https://git.openjdk.org/jdk/pull/14994#issuecomment-1649617257

Re: RFR: JDK-8311822: AIX : test/jdk/java/foreign/TestLayouts.java fails because of different output - expected [[i4](struct)] but found [[I4](struct)]

2023-07-25 Thread Matthias Baesken
On Mon, 24 Jul 2023 13:55:18 GMT, Matthias Baesken wrote: > I put this patch into our internal test queue to see how it works on AIX. AIX tests are fine too. - PR Comment: https://git.openjdk.org/jdk/pull/14994#issuecomment-1649612399

Re: [jdk21] RFR: 8309032: jpackage does not work for module projects unless --module-path is specified

2023-07-25 Thread airsquared
On Thu, 20 Jul 2023 02:34:05 GMT, airsquared wrote: > 8309032: jpackage does not work for module projects unless --module-path is > specified I see. I'll create a PR there. Thanks. - PR Comment: https://git.openjdk.org/jdk21/pull/140#issuecomment-1649249253

Re: [jdk21] RFR: 8309032: jpackage does not work for module projects unless --module-path is specified

2023-07-25 Thread Alan Bateman
On Tue, 25 Jul 2023 06:56:26 GMT, airsquared wrote: > How likely is it that this can get approved in RDP 2? This is only a tiny > change that fixes a minor bug in jpackage. Unlikely as this is a P4 and not a regression in JDK 21. I think you should be aiming for jdk21u with this backport. ---

Re: [jdk21] RFR: 8309032: jpackage does not work for module projects unless --module-path is specified

2023-07-25 Thread airsquared
On Thu, 20 Jul 2023 02:34:05 GMT, airsquared wrote: > 8309032: jpackage does not work for module projects unless --module-path is > specified How likely is it that this can get approved in RDP 2? This is only a tiny change that fixes a minor bug in jpackage. - PR Comment: https:/