Re: RFR: 8361888: [GCC static analyzer] ProcessImpl_md.c Java_java_lang_ProcessImpl_forkAndExec error: use of uninitialized value '*(ChildStuff *)p.mode

2025-07-15 Thread SendaoYan
On Tue, 15 Jul 2025 12:51:09 GMT, Matthias Baesken wrote: > When using GCC static analyzer (-fanalyzer), the following issue is reported. > Seems `c->mode` is initialized later in the method, but we use it already in > the exception, this looks wrong. > > > /jdk/src/java.base/unix/native/libja

Re: RFR: 8361076: Add benchmark for ImageReader in preparation for Valhalla changes [v3]

2025-07-15 Thread Alan Bateman
On Tue, 1 Jul 2025 16:50:09 GMT, David Beaumont wrote: >> test/micro/org/openjdk/bench/jdk/internal/jrtfs/ImageReaderBenchmark.java >> line 230: >> >>> 228: // Created by running "java -verbose:class", throwing away >>> anonymous inner >>> 229: // classes and anything without a reliabl

Integrated: 8362207: Add more test cases for possible double-rounding in fma

2025-07-15 Thread Joe Darcy
On Tue, 15 Jul 2025 01:10:05 GMT, Joe Darcy wrote: > From discussions related to IEEE 754, a few explicit test cases were > identified where plausible, but incorrect, implementations of fma using > higher precision. These test cases are useful to include in the regression > tests of the float-

Re: RFR: 8362207: Add more test cases for possible double-rounding in fma

2025-07-15 Thread SendaoYan
On Tue, 15 Jul 2025 01:10:05 GMT, Joe Darcy wrote: > From discussions related to IEEE 754, a few explicit test cases were > identified where plausible, but incorrect, implementations of fma using > higher precision. These test cases are useful to include in the regression > tests of the float-

Re: RFR: 8360037: Refactor ImageReader in preparation for Valhalla support [v10]

2025-07-15 Thread Alan Bateman
On Tue, 15 Jul 2025 21:23:06 GMT, David Beaumont wrote: >> Refactoring `ImageReader` to make it easy to add preview mode functionality >> for Valhalla. >> >> This PR is a large change to `ImageReader` (effectively a rewrite) but >> reduces the surface area of the API significantly, reduces cod

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v3]

2025-07-15 Thread Tobias Hartmann
On Tue, 15 Jul 2025 20:24:04 GMT, Volkan Yazici wrote: >> Validate input in `java.lang.StringCoding` intrinsic Java wrappers, improve >> their documentation, enhance the checks in the associated IR or assembly >> code, and adapt them to cause VM crash on invalid input. >> >> ## Implementation

Re: How important is jspawnhelper crash detection?

2025-07-15 Thread Thomas Stüfe
Thanks, Roger, I will proceed with removing the old workaround then. On Tue, Jul 15, 2025 at 5:05 PM Roger Riggs wrote: > Hi Thomas, > > Simpler is better on both sides of the protocol. > The version check will have happened before this part of the protocol so > there's no confusion about matchi

Re: RFR: 8362376: Use @Stable annotation in Java FDLIBM implementation

2025-07-15 Thread Joe Darcy
On Wed, 16 Jul 2025 04:53:04 GMT, Joe Darcy wrote: > Add `@Stable` to the static final arrays used in the Java port of FDLIBM. Some small refactorings could be used to make a few non-static arrays static. - PR Comment: https://git.openjdk.org/jdk/pull/26341#issuecomment-3076738696

RFR: 8362376: Use @Stable annotation in Java FDLIBM implementation

2025-07-15 Thread Joe Darcy
Add `@Stable` to the static final arrays used in the Java port of FDLIBM. - Commit messages: - JDK-8362376: Use @Stable annotation in Java FDLIBM implementation Changes: https://git.openjdk.org/jdk/pull/26341/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26341&range=00

Re: RFR: 8359419: AArch64: Relax min vector length to 32-bit for short vectors [v4]

2025-07-15 Thread Xiaohong Gong
On Wed, 9 Jul 2025 01:23:43 GMT, Xiaohong Gong wrote: >> ### Background >> On AArch64, the minimum vector length supported is 64-bit for basic types, >> except for `byte` and `boolean` (32-bit and 16-bit respectively to match >> special Vector API features). This limitation prevents intrinsific

Re: RFR: 8315131: Clarify VarHandle set/get access on 32-bit platforms [v3]

2025-07-15 Thread Chen Liang
On Fri, 11 Jul 2025 19:02:31 GMT, Chen Liang wrote: >> On 32 bit platforms, when an access to long/double is aligned, it is >> supported but not atomic. The original wording in >> `MethodHandles::byteBufferViewVarHandle` sounds as if it is not supported at >> all. We can fix that by borrowing

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v5]

2025-07-15 Thread Alexander Matveev
On Tue, 15 Jul 2025 02:31:03 GMT, Alexey Semenyuk wrote: >> [19:14:45.620] jdk.jpackage.internal.model.PackagerException: >> java.lang.ClassCastException: class com.sun.proxy.jdk.proxy1.$Proxy0 cannot >> be cast to class jdk.jpackage.internal.MacApplicationLayout >> (com.sun.proxy.jdk.proxy1.$

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v4]

2025-07-15 Thread Alexander Matveev
On Mon, 14 Jul 2025 23:25:58 GMT, Alexey Semenyuk wrote: >> Alexander Matveev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v3] > > src/jdk.jpackage/macosx/classes/jd

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v2]

2025-07-15 Thread Alexander Matveev
On Mon, 14 Jul 2025 23:08:53 GMT, Alexey Semenyuk wrote: >> I need it inside `createMacApplication()` before `MacApplication` instance >> is created. > > If you need a property of a `MacApplication` instance, create it and get the > property. > `MacApplicationBuilder.validatedBundleIdentifier()

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v4]

2025-07-15 Thread Alexander Matveev
On Fri, 11 Jul 2025 16:44:05 GMT, Alexander Matveev wrote: >> Re-submission of https://github.com/openjdk/jdk/pull/25314 after merge >> conflict was resolved. Old PR will be closed. >> >> All comments are addressed from old PR. Merge conflict was significant, so >> it is like new fix. >> >>

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v5]

2025-07-15 Thread Alexander Matveev
> Re-submission of https://github.com/openjdk/jdk/pull/25314 after merge > conflict was resolved. Old PR will be closed. > > All comments are addressed from old PR. Merge conflict was significant, so it > is like new fix. > > Fixed jpackage to produce valid Java runtimes based on description be

Re: RFR: 8358880: Performance of parsing with DecimalFormat can be improved [v6]

2025-07-15 Thread Chen Liang
On Mon, 16 Jun 2025 21:19:45 GMT, Johannes Graham wrote: >> This PR replaces construction of intermediate strings to be parsed with more >> direct manipulation of numbers. It also has a more streamlined mechanism of >> handling `Long.MIN_VALUE` when parsing longs by using >> `Long.parseUnsigne

RFR: 8362304: Fix JDWP spec w.r.t. OPAQUE_FRAME and INVALID_SLOT errors

2025-07-15 Thread Chris Plummer
StackFrame.SetValues, StackFrame.GetValues, ThreadReference.PopFrames, and ThreadReference.ForceEarlyReturn all need updated language related to OPAQUE_FRAME error. (1) The spec for JVMTI says the following for GetLocalsXXX and SetLocalsXXX The implementation is unable to set the frame locals

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v3]

2025-07-15 Thread Roger Riggs
On Tue, 15 Jul 2025 20:24:04 GMT, Volkan Yazici wrote: >> Validate input in `java.lang.StringCoding` intrinsic Java wrappers, improve >> their documentation, enhance the checks in the associated IR or assembly >> code, and adapt them to cause VM crash on invalid input. >> >> ## Implementation

Re: RFR: 8360575: java.util.Properties.list() methods trim each value to 37 characters in the listed output [v4]

2025-07-15 Thread Roger Riggs
On Mon, 30 Jun 2025 06:01:44 GMT, Jaikiran Pai wrote: >> Can I please get a review of this doc-only change which proposes to clarify >> the current implementation of the `java.util.Properties.list(...)` methods? >> >> As noted in https://bugs.openjdk.org/browse/JDK-8360575, the current >> impl

Re: RFR: 8361076: Add benchmark for ImageReader in preparation for Valhalla changes [v4]

2025-07-15 Thread David Beaumont
On Tue, 1 Jul 2025 17:02:27 GMT, David Beaumont wrote: >> Initial benchmark to capture at least some comparative measures of >> ImageReader performance. >> >> Current results on my laptop: >> >> Benchmark Mode Cnt ScoreError >> Units >> NewImage

Re: RFR: 8360037: Refactor ImageReader in preparation for Valhalla support [v10]

2025-07-15 Thread David Beaumont
> Refactoring `ImageReader` to make it easy to add preview mode functionality > for Valhalla. > > This PR is a large change to `ImageReader` (effectively a rewrite) but > reduces the surface area of the API significantly, reduces code complexity > and increases performance/memory efficiency. Th

Integrated: 8361640: JFR: RandomAccessFile::readLine emits events for each character

2025-07-15 Thread Erik Gahlin
On Wed, 9 Jul 2025 05:45:01 GMT, Erik Gahlin wrote: > Could I have a review of the change that prevents RandomAccessFile::readLine > from emitting an event per character? This leads to unnecessary overhead, > both with or without JFR enabled. > > Testing: tier1 + tier2 + jdk/jdk/jfr > > Than

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v2]

2025-07-15 Thread Roger Riggs
On Tue, 15 Jul 2025 20:24:22 GMT, Volkan Yazici wrote: >> src/java.base/share/classes/sun/nio/cs/ISO_8859_1.java line 201: >> >>> 199: int len = (dlen < slen) ? dlen : slen; >>> 200: try { >>> 201: int ret = len <= 0 ? 0 : encodeISOArray(sa, sp, da, >>>

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v2]

2025-07-15 Thread Volkan Yazici
On Tue, 15 Jul 2025 19:45:33 GMT, Roger Riggs wrote: >> Volkan Yazici has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Minimize the number of touched lines in `vmIntrinsics.hpp` >> - Remove Markdown-styling in comments >> - Improve

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v2]

2025-07-15 Thread Volkan Yazici
On Tue, 15 Jul 2025 19:25:31 GMT, Roger Riggs wrote: >> Volkan Yazici has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Minimize the number of touched lines in `vmIntrinsics.hpp` >> - Remove Markdown-styling in comments >> - Improve

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v3]

2025-07-15 Thread Volkan Yazici
> Validate input in `java.lang.StringCoding` intrinsic Java wrappers, improve > their documentation, enhance the checks in the associated IR or assembly > code, and adapt them to cause VM crash on invalid input. > > ## Implementation notes > > The goal of the associated umbrella issue > [JDK-8

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v2]

2025-07-15 Thread Roger Riggs
On Tue, 15 Jul 2025 19:21:28 GMT, Volkan Yazici wrote: >> Validate input in `java.lang.StringCoding` intrinsic Java wrappers, improve >> their documentation, enhance the checks in the associated IR or assembly >> code, and adapt them to cause VM crash on invalid input. >> >> ## Implementation

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v2]

2025-07-15 Thread Volkan Yazici
On Mon, 14 Jul 2025 10:32:24 GMT, Damon Fenacci wrote: > I left a couple of minor comments. I also noticed that you haven't yet added > the benchmark results to the description: do you want to run them again after > the reviews? @dafedafe, thanks so much for the review! I've implemented the ch

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v2]

2025-07-15 Thread Volkan Yazici
On Mon, 14 Jul 2025 09:11:08 GMT, Damon Fenacci wrote: >> Volkan Yazici has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Minimize the number of touched lines in `vmIntrinsics.hpp` >> - Remove Markdown-styling in comments >> - Improv

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v2]

2025-07-15 Thread Volkan Yazici
On Mon, 14 Jul 2025 10:27:45 GMT, Damon Fenacci wrote: >> Volkan Yazici has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Minimize the number of touched lines in `vmIntrinsics.hpp` >> - Remove Markdown-styling in comments >> - Improv

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v2]

2025-07-15 Thread Volkan Yazici
On Mon, 14 Jul 2025 08:49:44 GMT, Damon Fenacci wrote: >> Volkan Yazici has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Minimize the number of touched lines in `vmIntrinsics.hpp` >> - Remove Markdown-styling in comments >> - Improv

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v2]

2025-07-15 Thread Volkan Yazici
> Validate input in `java.lang.StringCoding` intrinsic Java wrappers, improve > their documentation, enhance the checks in the associated IR or assembly > code, and adapt them to cause VM crash on invalid input. > > ## Implementation notes > > The goal of the associated umbrella issue > [JDK-8

Re: RFR: 8360037: Refactor ImageReader in preparation for Valhalla support [v9]

2025-07-15 Thread Roger Riggs
On Tue, 15 Jul 2025 11:05:27 GMT, David Beaumont wrote: >> Refactoring `ImageReader` to make it easy to add preview mode functionality >> for Valhalla. >> >> This PR is a large change to `ImageReader` (effectively a rewrite) but >> reduces the surface area of the API significantly, reduces cod

Re: RFR: 8360037: Refactor ImageReader in preparation for Valhalla support [v9]

2025-07-15 Thread Roger Riggs
On Tue, 15 Jul 2025 11:05:27 GMT, David Beaumont wrote: >> Refactoring `ImageReader` to make it easy to add preview mode functionality >> for Valhalla. >> >> This PR is a large change to `ImageReader` (effectively a rewrite) but >> reduces the surface area of the API significantly, reduces cod

Re: RFR: 8360037: Refactor ImageReader in preparation for Valhalla support [v7]

2025-07-15 Thread Roger Riggs
On Tue, 15 Jul 2025 10:22:08 GMT, David Beaumont wrote: >> src/java.base/share/classes/jdk/internal/jimage/ImageReader.java line 182: >> >>> 180: >>> 181: private static final class SharedImageReader extends >>> BasicImageReader { >>> 182: // TODO: Should this be OPEN_FILES or open

Re: RFR: 8361640: JFR: RandomAccessFile::readLine emits events for each character [v2]

2025-07-15 Thread Roger Riggs
On Tue, 15 Jul 2025 17:09:23 GMT, Erik Gahlin wrote: >> Could I have a review of the change that prevents RandomAccessFile::readLine >> from emitting an event per character? This leads to unnecessary overhead, >> both with or without JFR enabled. >> >> Testing: tier1 + tier2 + jdk/jdk/jfr >>

[jdk25] RFR: 8361587: AssertionError in File.listFiles() when path is empty and -esa is enabled

2025-07-15 Thread Brian Burkhalter
Hi all, This pull request contains a backport of commit [eefbfdce](https://github.com/openjdk/jdk/commit/eefbfdce315237eeec4aceceb476d86314304e81) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. The commit being backported was authored by Brian Burkhalter on 15 Jul 2025 and was

Integrated: 8361587: AssertionError in File.listFiles() when path is empty and -esa is enabled

2025-07-15 Thread Brian Burkhalter
On Wed, 9 Jul 2025 18:04:08 GMT, Brian Burkhalter wrote: > Changes to address `File.listFiles` invoked on an empty path. This fixes an > oversight in #22821. This pull request has now been integrated. Changeset: eefbfdce Author:Brian Burkhalter URL: https://git.openjdk.org/jdk/comm

Re: RFR: 8361640: JFR: RandomAccessFile::readLine emits events for each character [v2]

2025-07-15 Thread Alan Bateman
On Tue, 15 Jul 2025 17:09:23 GMT, Erik Gahlin wrote: >> Could I have a review of the change that prevents RandomAccessFile::readLine >> from emitting an event per character? This leads to unnecessary overhead, >> both with or without JFR enabled. >> >> Testing: tier1 + tier2 + jdk/jdk/jfr >>

Re: RFR: 8361587: AssertionError in File.listFiles() when path is empty and -esa is enabled [v8]

2025-07-15 Thread Alan Bateman
On Tue, 15 Jul 2025 17:36:22 GMT, Brian Burkhalter wrote: >> Changes to address `File.listFiles` invoked on an empty path. This fixes an >> oversight in #22821. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8361587:

Integrated: 8360459: UNICODE_CASE and character class with non-ASCII range does not match ASCII char

2025-07-15 Thread Xueming Shen
On Mon, 14 Jul 2025 04:53:13 GMT, Xueming Shen wrote: > Regex class should conform to **_Level 1_** of [Unicode Technical Standard > #18: Unicode Regular Expressions](http://www.unicode.org/reports/tr18/), plus > RL2.1 Canonical Equivalents and RL2.2 Extended Grapheme Clusters. > > This PR pri

Re: RFR: 8360459: UNICODE_CASE and character class with non-ASCII range does not match ASCII char [v6]

2025-07-15 Thread Xueming Shen
On Tue, 15 Jul 2025 17:47:29 GMT, Xueming Shen wrote: >> Regex class should conform to **_Level 1_** of [Unicode Technical Standard >> #18: Unicode Regular Expressions](http://www.unicode.org/reports/tr18/), >> plus RL2.1 Canonical Equivalents and RL2.2 Extended Grapheme Clusters. >> >> This P

Re: RFR: 8361640: JFR: RandomAccessFile::readLine emits events for each character [v2]

2025-07-15 Thread Erik Gahlin
On Tue, 15 Jul 2025 16:09:38 GMT, Alan Bateman wrote: >> Erik Gahlin has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Remove traceImplReadLine > > src/java.base/share/classes/java/io/RandomAccessFile.java line 1039: > >> 1037: } >> 1

Re: RFR: 8360459: UNICODE_CASE and character class with non-ASCII range does not match ASCII char [v6]

2025-07-15 Thread Xueming Shen
> Regex class should conform to **_Level 1_** of [Unicode Technical Standard > #18: Unicode Regular Expressions](http://www.unicode.org/reports/tr18/), plus > RL2.1 Canonical Equivalents and RL2.2 Extended Grapheme Clusters. > > This PR primarily addresses conformance with RL1.5: Simple Loose Ma

Re: RFR: 8360459: UNICODE_CASE and character class with non-ASCII range does not match ASCII char [v6]

2025-07-15 Thread Naoto Sato
On Tue, 15 Jul 2025 17:44:00 GMT, Xueming Shen wrote: >> Regex class should conform to **_Level 1_** of [Unicode Technical Standard >> #18: Unicode Regular Expressions](http://www.unicode.org/reports/tr18/), >> plus RL2.1 Canonical Equivalents and RL2.2 Extended Grapheme Clusters. >> >> This P

Re: RFR: 8361587: AssertionError in File.listFiles() when path is empty and -esa is enabled [v8]

2025-07-15 Thread Brian Burkhalter
> Changes to address `File.listFiles` invoked on an empty path. This fixes an > oversight in #22821. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8361587: Fix mkdirs sub-test - Changes: - all: https://git.openj

Re: RFR: 8361587: AssertionError in File.listFiles() when path is empty and -esa is enabled [v7]

2025-07-15 Thread Brian Burkhalter
On Tue, 15 Jul 2025 17:03:18 GMT, Brian Burkhalter wrote: >> Okay, but if I read this correctly then these methods will test mkdirs with >> a non-empty path as child will be "/child" or "\child". In order to test >> mkdirs with an empty path then I think we need `assertFalse(f.mkdirs());` > >>

Re: RFR: 8361640: JFR: RandomAccessFile::readLine emits events for each character [v2]

2025-07-15 Thread Erik Gahlin
> Could I have a review of the change that prevents RandomAccessFile::readLine > from emitting an event per character? This leads to unnecessary overhead, > both with or without JFR enabled. > > Testing: tier1 + tier2 + jdk/jdk/jfr > > Thanks > Erik Erik Gahlin has updated the pull request in

Re: RFR: 8361587: AssertionError in File.listFiles() when path is empty and -esa is enabled [v5]

2025-07-15 Thread Brian Burkhalter
On Fri, 11 Jul 2025 15:34:26 GMT, Brian Burkhalter wrote: >> src/java.base/unix/classes/java/io/UnixFileSystem.java line 120: >> >>> 118: public String resolve(String parent, String child) { >>> 119: if (child.isEmpty()) return parent; >>> 120: if (parent.isEmpty()) return ch

Re: RFR: 8361587: AssertionError in File.listFiles() when path is empty and -esa is enabled [v7]

2025-07-15 Thread Brian Burkhalter
On Tue, 15 Jul 2025 16:43:49 GMT, Alan Bateman wrote: >> Yes. The OS-dependent `mkdirs` sub-tests reflect the actual behavior. > > Okay, but if I read this correctly then these methods will test mkdirs with a > non-empty path as child will be "/child" or "\child". In order to test > mkdirs wit

Re: RFR: 8360459: UNICODE_CASE and character class with non-ASCII range does not match ASCII char [v5]

2025-07-15 Thread Xueming Shen
On Tue, 15 Jul 2025 15:11:07 GMT, Xueming Shen wrote: >> Regex class should conform to **_Level 1_** of [Unicode Technical Standard >> #18: Unicode Regular Expressions](http://www.unicode.org/reports/tr18/), >> plus RL2.1 Canonical Equivalents and RL2.2 Extended Grapheme Clusters. >> >> This P

Re: RFR: 8361587: AssertionError in File.listFiles() when path is empty and -esa is enabled [v7]

2025-07-15 Thread Alan Bateman
On Tue, 15 Jul 2025 15:27:06 GMT, Brian Burkhalter wrote: >> test/jdk/java/io/File/EmptyPath.java line 283: >> >>> 281: assertTrue(child.mkdirs()); >>> 282: assertTrue(child.delete()); >>> 283: } >> >> The updated proposal is local to listFiles and doesn't change

Re: RFR: 8358530: enhanced Properties#list javadoc

2025-07-15 Thread Justin Lu
On Tue, 20 May 2025 16:03:14 GMT, cagliostro92 wrote: > Trivial PR to enhance Javadoc for the `Properties#list` method, which has > cost me some debugging time. The copyright year for this file should also be updated: `1995, 2025,` Also, the PR title will need to be changed to, _8358530: Prop

Re: RFR: 8360459: UNICODE_CASE and character class with non-ASCII range does not match ASCII char [v5]

2025-07-15 Thread Naoto Sato
On Tue, 15 Jul 2025 15:11:07 GMT, Xueming Shen wrote: >> Regex class should conform to **_Level 1_** of [Unicode Technical Standard >> #18: Unicode Regular Expressions](http://www.unicode.org/reports/tr18/), >> plus RL2.1 Canonical Equivalents and RL2.2 Extended Grapheme Clusters. >> >> This P

Re: RFR: 8361613: System.console() should only be available for interactive terminal [v3]

2025-07-15 Thread Naoto Sato
On Tue, 15 Jul 2025 14:31:45 GMT, Xueming Shen wrote: >> Maybe I missed it, but do we have anything to make it clear that it returns >> null if either stdin or stdout are redirected? > > we do have wordings like " If the virtual machine is started from an > interactive command line without redi

Re: RFR: 8361640: JFR: RandomAccessFile::readLine emits events for each character

2025-07-15 Thread Alan Bateman
On Wed, 9 Jul 2025 05:45:01 GMT, Erik Gahlin wrote: > Could I have a review of the change that prevents RandomAccessFile::readLine > from emitting an event per character? This leads to unnecessary overhead, > both with or without JFR enabled. > > Testing: tier1 + tier2 + jdk/jdk/jfr > > Than

Re: RFR: 8358768: [vectorapi] Make VectorOperators.SUADD an Associative [v4]

2025-07-15 Thread Ian Graves
On Tue, 15 Jul 2025 15:41:59 GMT, Quan Anh Mai wrote: >> Ian Graves has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Condensing test data > > I believe this is inadequate, an `Associative` will allow reduction > operation. You need to ad

Re: RFR: 8358768: [vectorapi] Make VectorOperators.SUADD an Associative [v4]

2025-07-15 Thread Paul Sandoz
On Tue, 15 Jul 2025 15:41:59 GMT, Quan Anh Mai wrote: > I believe this is inadequate, an `Associative` will allow reduction > operation. You need to add support for `SUADD` to that, too. Grrr... yes thank you for spotting that obvious omission. We can do that in a follow on PR, but without any

Re: RFR: 8358768: [vectorapi] Make VectorOperators.SUADD an Associative [v4]

2025-07-15 Thread Quan Anh Mai
On Mon, 14 Jul 2025 21:43:58 GMT, Ian Graves wrote: >> Adding SUADD an associative operation in the Vector API. Saturated addition >> on fixed-width unsigned integers is provably associative. > > Ian Graves has updated the pull request incrementally with one additional > commit since the last r

Re: RFR: 8361587: AssertionError in File.listFiles() when path is empty and -esa is enabled [v7]

2025-07-15 Thread Brian Burkhalter
On Tue, 15 Jul 2025 06:36:46 GMT, Alan Bateman wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8361587: Improve previous commit > > test/jdk/java/io/File/EmptyPath.java line 283: > >> 281: assertTr

Re: RFR: 8361972: Clarify the condition of System.console() about standard input/output [v2]

2025-07-15 Thread Joe Wang
On Mon, 14 Jul 2025 22:39:56 GMT, Naoto Sato wrote: >> This accompanies the fix for >> [JDK-8361613](https://bugs.openjdk.org/browse/JDK-8361613), which restricts >> `System.console()` to return a `Console` instance only when both standard >> input and output are connected to a terminal. The c

Re: RFR: 8360575: java.util.Properties.list() methods trim each value to 37 characters in the listed output [v4]

2025-07-15 Thread Roger Riggs
On Mon, 30 Jun 2025 06:01:44 GMT, Jaikiran Pai wrote: >> Can I please get a review of this doc-only change which proposes to clarify >> the current implementation of the `java.util.Properties.list(...)` methods? >> >> As noted in https://bugs.openjdk.org/browse/JDK-8360575, the current >> impl

Re: RFR: 8362207: Add more test cases for possible double-rounding in fma

2025-07-15 Thread Raffaello Giulietti
On Tue, 15 Jul 2025 01:10:05 GMT, Joe Darcy wrote: > From discussions related to IEEE 754, a few explicit test cases were > identified where plausible, but incorrect, implementations of fma using > higher precision. These test cases are useful to include in the regression > tests of the float-

Re: RFR: 8360459: UNICODE_CASE and character class with non-ASCII range does not match ASCII char [v5]

2025-07-15 Thread Xueming Shen
On Mon, 14 Jul 2025 07:28:09 GMT, Xueming Shen wrote: >> src/java.base/share/classes/jdk/internal/util/regex/CaseFolding.java.template >> line 99: >> >>> 97: */ >>> 98: public static int[] getClassRangeClosingCharacters(int start, int >>> end) { >>> 99: int[] expanded = new in

Re: RFR: 8360459: UNICODE_CASE and character class with non-ASCII range does not match ASCII char [v5]

2025-07-15 Thread Xueming Shen
> Regex class should conform to **_Level 1_** of [Unicode Technical Standard > #18: Unicode Regular Expressions](http://www.unicode.org/reports/tr18/), plus > RL2.1 Canonical Equivalents and RL2.2 Extended Grapheme Clusters. > > This PR primarily addresses conformance with RL1.5: Simple Loose Ma

Re: How important is jspawnhelper crash detection?

2025-07-15 Thread Roger Riggs
Hi Thomas, Simpler is better on both sides of the protocol. The version check will have happened before this part of the protocol so there's no confusion about matching expectations. I agree that removing it is preferred. Roger On 7/15/25 10:44 AM, Thomas Stüfe wrote: Hi, I am currently wo

How important is jspawnhelper crash detection?

2025-07-15 Thread Thomas Stüfe
Hi, I am currently working on removing (eventually) the vfork mode. Before we can do this, we need a bit better error diagnostics. I do this by gently improving the error handling throughout the code, so that we can generate IOExceptions based on more exact knowledge. While working at this, I re-

Integrated: 8358768: [vectorapi] Make VectorOperators.SUADD an Associative

2025-07-15 Thread Ian Graves
On Wed, 2 Jul 2025 16:47:36 GMT, Ian Graves wrote: > Adding SUADD an associative operation in the Vector API. Saturated addition > on fixed-width unsigned integers is provably associative. This pull request has now been integrated. Changeset: b65fdf5a Author:Ian Graves URL: https:/

Re: RFR: 8361613: System.console() should only be available for interactive terminal [v3]

2025-07-15 Thread Xueming Shen
On Tue, 15 Jul 2025 13:29:03 GMT, Alan Bateman wrote: >> src/java.base/share/classes/java/lang/System.java line 244: >> >>> 242: * >>> 243: * @return The system console, if any, otherwise {@code null}. >>> 244: * @see Console >> >> The method declaration already links to Console

Re: RFR: 8361640: JFR: RandomAccessFile::readLine emits events for each character

2025-07-15 Thread Roger Riggs
On Wed, 9 Jul 2025 05:45:01 GMT, Erik Gahlin wrote: > Could I have a review of the change that prevents RandomAccessFile::readLine > from emitting an event per character? This leads to unnecessary overhead, > both with or without JFR enabled. > > Testing: tier1 + tier2 + jdk/jdk/jfr > > Than

Re: RFR: 8357913: Add `@Stable` to BigInteger and BigDecimal [v4]

2025-07-15 Thread Raffaello Giulietti
On Wed, 4 Jun 2025 13:12:33 GMT, Shaojin Wen wrote: >> Some static final arrays of BigInteger and BigDecimal are stable and >> immutable. We should add `@Stable` to give the optimizer more information > > Shaojin Wen has updated the pull request with a new target base due to a > merge or a reba

Re: RFR: 8361888: [GCC static analyzer] ProcessImpl_md.c Java_java_lang_ProcessImpl_forkAndExec error: use of uninitialized value '*(ChildStuff *)p.mode

2025-07-15 Thread Roger Riggs
On Tue, 15 Jul 2025 12:51:09 GMT, Matthias Baesken wrote: > When using GCC static analyzer (-fanalyzer), the following issue is reported. > Seems `c->mode` is initialized later in the method, but we use it already in > the exception, this looks wrong. > > > /jdk/src/java.base/unix/native/libja

Re: RFR: 8361613: System.console() should only be available for interactive terminal [v3]

2025-07-15 Thread Alan Bateman
On Tue, 15 Jul 2025 13:25:16 GMT, Alan Bateman wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Reflects review comments > > src/java.base/share/classes/java/lang/System.java line 244: > >> 242: * >> 243: *

Re: RFR: 8361613: System.console() should only be available for interactive terminal [v3]

2025-07-15 Thread Alan Bateman
On Mon, 14 Jul 2025 20:23:25 GMT, Naoto Sato wrote: >> In prior JDK releases, `System.console()` could return a `Console` instance >> even when the JVM was not attached to an interactive terminal. This could >> lead to confusion, particularly when input was not from a keyboard or output >> was

Integrated: 8358540: Enhance MathUtils in view of FloatingDecimal enhancements

2025-07-15 Thread Raffaello Giulietti
On Wed, 4 Jun 2025 14:22:43 GMT, Raffaello Giulietti wrote: > Another step in enhancing floating-point <-> decimal conversions. This pull request has now been integrated. Changeset: 563e8762 Author:Raffaello Giulietti URL: https://git.openjdk.org/jdk/commit/563e8762464fd1b291eb18f5

RFR: 8361888: [GCC static analyzer] ProcessImpl_md.c Java_java_lang_ProcessImpl_forkAndExec error: use of uninitialized value '*(ChildStuff *)p.mode

2025-07-15 Thread Matthias Baesken
When using GCC static analyzer (-fanalyzer), the following issue is reported. Seems `c->mode` is initialized later in the method, but we use it already in the exception, this looks wrong. /jdk/src/java.base/unix/native/libjava/ProcessImpl_md.c: In function 'Java_java_lang_ProcessImpl_forkAndExe

Re: ClassLoader Leak via Executors.newSingleThreadExecutor(...)

2025-07-15 Thread Chris Dennis
Apologies, that description is pretty lousy. A more explicit description of the leak (the one in my test in https://github.com/openjdk/jdk/pull/26296) would be: A class loaded by classloader 'C' statically references an Executor created via newSingleThreadExecutor(threadFactory). The ThreadFactory

Re: RFR: 8360037: Refactor ImageReader in preparation for Valhalla support [v9]

2025-07-15 Thread David Beaumont
> Refactoring `ImageReader` to make it easy to add preview mode functionality > for Valhalla. > > This PR is a large change to `ImageReader` (effectively a rewrite) but > reduces the surface area of the API significantly, reduces code complexity > and increases performance/memory efficiency. Th

Re: ClassLoader Leak via Executors.newSingleThreadExecutor(...)

2025-07-15 Thread Alan Bateman
On 11/07/2025 15:42, Chris Dennis wrote: Hi All, I believe I've identified a bug in Executors.AutoShutdownDelegatedExecutorService that can trigger a classloader leak even in the presence of "correct" Executor lifecycling. AutoShutdownDelegatedExecutorService only unlinks the PhantomReferenc

Re: RFR: 8360037: Refactor ImageReader in preparation for Valhalla support [v7]

2025-07-15 Thread David Beaumont
On Fri, 11 Jul 2025 14:41:30 GMT, David Beaumont wrote: >> Refactoring `ImageReader` to make it easy to add preview mode functionality >> for Valhalla. >> >> This PR is a large change to `ImageReader` (effectively a rewrite) but >> reduces the surface area of the API significantly, reduces cod

Re: RFR: 8360037: Refactor ImageReader in preparation for Valhalla support [v8]

2025-07-15 Thread David Beaumont
> Refactoring `ImageReader` to make it easy to add preview mode functionality > for Valhalla. > > This PR is a large change to `ImageReader` (effectively a rewrite) but > reduces the surface area of the API significantly, reduces code complexity > and increases performance/memory efficiency. Th

Re: RFR: 8360037: Refactor ImageReader in preparation for Valhalla support [v7]

2025-07-15 Thread David Beaumont
On Mon, 14 Jul 2025 20:11:51 GMT, Roger Riggs wrote: >> David Beaumont has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Linting of a few minor issues (nothing serious). >> >> * Linting of minor issues. >> * Factored out the module

Re: RFR: 8358530: enhanced Properties#list javadoc

2025-07-15 Thread Justin Lu
On Tue, 20 May 2025 16:03:14 GMT, cagliostro92 wrote: > Trivial PR to enhance Javadoc for the `Properties#list` method, which has > cost me some debugging time. It does appear true that a `ClassCastException` is thrown if a value is not a String for `Properties.list(PrintWriter)` and the behav

Re: RFR: 8358530: enhanced Properties#list javadoc

2025-07-15 Thread cagliostro92
On Fri, 11 Jul 2025 20:51:38 GMT, Justin Lu wrote: >> Trivial PR to enhance Javadoc for the `Properties#list` method, which has >> cost me some debugging time. > > It does appear true that a `ClassCastException` is thrown if a value is not a > String for `Properties.list(PrintWriter)` and the b

RFR: 8358530: enhanced Properties#list javadoc

2025-07-15 Thread cagliostro92
Trivial PR to enhance Javadoc for the `Properties#list` method, which has cost me some debugging time. - Commit messages: - 8358530: adds warnings against non-String values in Properties class documentation Changes: https://git.openjdk.org/jdk/pull/25334/files Webrev: https://we

Re: RFR: 8361959: [GCC static analyzer] java_props_md.c leak of 'temp' variable is reported [v2]

2025-07-15 Thread Matthias Baesken
On Sat, 12 Jul 2025 17:36:54 GMT, Matthias Baesken wrote: >> The following is reported when building with the gcc static analyzer >> (-fanalyzer) : >> >> >> /jdk/src/java.base/unix/native/libjava/java_props_md.c:244:17: warning: leak >> of 'temp' [CWE-401] [-Wanalyzer-malloc-leak] >> 244 |

Integrated: 8361959: [GCC static analyzer] java_props_md.c leak of 'temp' variable is reported

2025-07-15 Thread Matthias Baesken
On Fri, 11 Jul 2025 12:45:55 GMT, Matthias Baesken wrote: > The following is reported when building with the gcc static analyzer > (-fanalyzer) : > > > /jdk/src/java.base/unix/native/libjava/java_props_md.c:244:17: warning: leak > of 'temp' [CWE-401] [-Wanalyzer-malloc-leak] > 244 | return

Re: RFR: 8361959: [GCC static analyzer] java_props_md.c leak of 'temp' variable is reported [v2]

2025-07-15 Thread Aleksey Shipilev
On Sat, 12 Jul 2025 17:36:54 GMT, Matthias Baesken wrote: >> The following is reported when building with the gcc static analyzer >> (-fanalyzer) : >> >> >> /jdk/src/java.base/unix/native/libjava/java_props_md.c:244:17: warning: leak >> of 'temp' [CWE-401] [-Wanalyzer-malloc-leak] >> 244 |