Re: RFR: 8331467: ImageReaderFactory can cause a ClassNotFoundException if the default FileSystemProvider is not the system-default provider [v7]

2024-12-13 Thread liyazzi
> For two cases: > > 1. When the ImageReaderFactory was loaded by local jdk,that means the > ImageReaderFactory was loaded by boot class loader,then init the `Path > BOOT_MODULES_JIMAGE` by using `sun.nio.fs.DefaultFileSystemProvider` which is > obtained through reflection,due to it is in jdk i

Re: RFR: 8345016: [ASAN] java.c false positive ‘%s’ directive argument is null [-Werror=format-truncation=]

2024-12-13 Thread SendaoYan
On Fri, 13 Dec 2024 20:40:45 GMT, Kim Barrett wrote: > using both at the same time could lead to strange conflicts between them The gcc [documentation](https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html) only mention that `-fsanitize=thread` could not use combined with `-fsanitiz

Re: RFR: 8345016: [ASAN] java.c false positive ‘%s’ directive argument is null [-Werror=format-truncation=]

2024-12-13 Thread SendaoYan
On Fri, 13 Dec 2024 20:40:45 GMT, Kim Barrett wrote: > Does either asan or ubsan alone have this problem? Use ubsan alone have this problem. And asan alone do not have this problem. Here is mime configure command: bash configure --with-jobs=128 --prefix=/home/yansendao/git/jdk/install-fastde

Re: [jdk24] RFR: 8345573: Module dependencies not resolved from run-time image when --limit-module is being used

2024-12-13 Thread Mandy Chung
On Fri, 13 Dec 2024 15:13:02 GMT, Severin Gehwolf wrote: > This is a clean backport of JDK-8345573 to the stabilization repo branch of > JDK 24 GA. Marked as reviewed by mchung (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/22738#pullrequestreview-2503411481

Re: RFR: 8346151: Add transformer error logging to VerifyLocalVariableTableOnRetransformTest [v3]

2024-12-13 Thread Chris Plummer
On Fri, 13 Dec 2024 23:07:53 GMT, Alex Menkov wrote: >> In some circumstances ClassFileTransformer.transform can get >> ClassCircularityError or LinkageError concatenating strings (see >> JDK-8264667, JDK-8262002). >> VerifyLocalVariableTableOnRetransformTest fails sometimes on Oracle CI. >> Th

Re: RFR: 8343342: java/io/File/GetXSpace.java fails on Windows with CD-ROM drive [v6]

2024-12-13 Thread Brian Burkhalter
On Fri, 13 Dec 2024 10:10:53 GMT, Taizo Kurashige wrote: >> test/jdk/java/io/File/GetXSpace.java line 415: >> >>> 413: private static native boolean isCDDrive(String root); >>> 414: >>> 415: private static long[] getCDDriveSpace(String root) throws >>> IOException { >> >> Why not pass

Re: RFR: 8321413: IllegalArgumentException: Code length outside the allowed range while creating a jlink image [v12]

2024-12-13 Thread Mandy Chung
On Fri, 13 Dec 2024 23:32:14 GMT, Henry Jen wrote: >> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java >> line 619: >> >>> 617: // generate dedup set fields and provider >>> methods >>> 618: var dedupSets = ge

Re: RFR: 8321413: IllegalArgumentException: Code length outside the allowed range while creating a jlink image [v12]

2024-12-13 Thread Henry Jen
On Fri, 13 Dec 2024 23:24:33 GMT, Mandy Chung wrote: >> Henry Jen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Move up Snippet setup as a builder > > src/jdk.jlink/share/classes/jdk/tools/jlink/internal/Snippets.java line 221: > >> 2

Re: RFR: 8321413: IllegalArgumentException: Code length outside the allowed range while creating a jlink image [v12]

2024-12-13 Thread Henry Jen
On Fri, 13 Dec 2024 22:42:47 GMT, Mandy Chung wrote: >> Henry Jen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Move up Snippet setup as a builder > > src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.jav

Re: RFR: 8321413: IllegalArgumentException: Code length outside the allowed range while creating a jlink image [v12]

2024-12-13 Thread Mandy Chung
On Fri, 13 Dec 2024 23:22:04 GMT, Henry Jen wrote: >> The code has been refactored. The comment should be updated to reflect the >> new code? > > Will do a pass in next commit, I want to see if this refactoring favorable. Yes it does. Thanks for the update. - PR Review Comment:

Re: RFR: 8321413: IllegalArgumentException: Code length outside the allowed range while creating a jlink image [v12]

2024-12-13 Thread Mandy Chung
On Fri, 13 Dec 2024 19:30:19 GMT, Henry Jen wrote: >> This PR split out large array/set construction into separate factory methods >> to avoid oversized method trying to construct several of those. >> >> In order to do that, we will need to generate those help methods on demand >> in the class

Re: RFR: 8321413: IllegalArgumentException: Code length outside the allowed range while creating a jlink image [v12]

2024-12-13 Thread Henry Jen
On Fri, 13 Dec 2024 23:06:47 GMT, Mandy Chung wrote: >> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java >> line 1136: >> >>> 1134: /* >>> 1135: * SetReference count references to the set, and use >>> LoadableSet under the hood to >

Re: RFR: 8321413: IllegalArgumentException: Code length outside the allowed range while creating a jlink image [v12]

2024-12-13 Thread Mandy Chung
On Fri, 13 Dec 2024 19:30:19 GMT, Henry Jen wrote: >> This PR split out large array/set construction into separate factory methods >> to avoid oversized method trying to construct several of those. >> >> In order to do that, we will need to generate those help methods on demand >> in the class

Re: RFR: 8343342: java/io/File/GetXSpace.java fails on Windows with CD-ROM drive [v8]

2024-12-13 Thread Brian Burkhalter
On Fri, 13 Dec 2024 21:10:31 GMT, Brian Burkhalter wrote: > Perhaps the output of `df` is not being parsed correctly? Actually I am getting df: 'D:': No such file or directory as the first line returned by the process that runs `df` when I run the test in Cygwin. On the command line this does

Re: RFR: 8321413: IllegalArgumentException: Code length outside the allowed range while creating a jlink image [v12]

2024-12-13 Thread Mandy Chung
On Fri, 13 Dec 2024 19:30:19 GMT, Henry Jen wrote: >> This PR split out large array/set construction into separate factory methods >> to avoid oversized method trying to construct several of those. >> >> In order to do that, we will need to generate those help methods on demand >> in the class

Re: RFR: 8321413: IllegalArgumentException: Code length outside the allowed range while creating a jlink image [v12]

2024-12-13 Thread Mandy Chung
On Fri, 13 Dec 2024 23:05:32 GMT, Mandy Chung wrote: >> Henry Jen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Move up Snippet setup as a builder > > src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.jav

Re: RFR: 8321413: IllegalArgumentException: Code length outside the allowed range while creating a jlink image [v12]

2024-12-13 Thread Mandy Chung
On Fri, 13 Dec 2024 19:30:19 GMT, Henry Jen wrote: >> This PR split out large array/set construction into separate factory methods >> to avoid oversized method trying to construct several of those. >> >> In order to do that, we will need to generate those help methods on demand >> in the class

Re: RFR: 8346151: Add transformer error logging to VerifyLocalVariableTableOnRetransformTest [v3]

2024-12-13 Thread Alex Menkov
> In some circumstances ClassFileTransformer.transform can get > ClassCircularityError or LinkageError concatenating strings (see JDK-8264667, > JDK-8262002). > VerifyLocalVariableTableOnRetransformTest fails sometimes on Oracle CI. > The fix adds handling of the errors to get information for ana

Re: RFR: 8346151: Add transformer error logging to VerifyLocalVariableTableOnRetransformTest [v2]

2024-12-13 Thread Chris Plummer
On Fri, 13 Dec 2024 21:51:10 GMT, Alex Menkov wrote: >> In some circumstances ClassFileTransformer.transform can get >> ClassCircularityError or LinkageError concatenating strings (see >> JDK-8264667, JDK-8262002). >> VerifyLocalVariableTableOnRetransformTest fails sometimes on Oracle CI. >> Th

Re: RFR: 8321413: IllegalArgumentException: Code length outside the allowed range while creating a jlink image [v12]

2024-12-13 Thread Mandy Chung
On Fri, 13 Dec 2024 19:30:19 GMT, Henry Jen wrote: >> This PR split out large array/set construction into separate factory methods >> to avoid oversized method trying to construct several of those. >> >> In order to do that, we will need to generate those help methods on demand >> in the class

Re: RFR: 8321413: IllegalArgumentException: Code length outside the allowed range while creating a jlink image [v12]

2024-12-13 Thread Mandy Chung
On Fri, 13 Dec 2024 19:30:19 GMT, Henry Jen wrote: >> This PR split out large array/set construction into separate factory methods >> to avoid oversized method trying to construct several of those. >> >> In order to do that, we will need to generate those help methods on demand >> in the class

Re: RFR: 8346202: Correct typo in SQLPermission

2024-12-13 Thread Iris Clark
On Fri, 13 Dec 2024 16:54:05 GMT, Lance Andersen wrote: > Please review this trivial PR which removes `(See below)` which was missed > during the SQLPermission update as part of the updates for [JEP 486: > Permanently Disable the Security Manager](https://openjdk.org/jeps/486) > > I have con

Re: RFR: 8346151: Add transformer error logging to VerifyLocalVariableTableOnRetransformTest [v2]

2024-12-13 Thread Alex Menkov
On Fri, 13 Dec 2024 20:49:22 GMT, Chris Plummer wrote: >> Alex Menkov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> feedback > > test/jdk/java/lang/instrument/VerifyLocalVariableTableOnRetransformTest.java > line 259: > >> 257:

Re: RFR: 8321413: IllegalArgumentException: Code length outside the allowed range while creating a jlink image [v12]

2024-12-13 Thread Mandy Chung
On Fri, 13 Dec 2024 19:30:19 GMT, Henry Jen wrote: >> This PR split out large array/set construction into separate factory methods >> to avoid oversized method trying to construct several of those. >> >> In order to do that, we will need to generate those help methods on demand >> in the class

Re: RFR: 8321413: IllegalArgumentException: Code length outside the allowed range while creating a jlink image [v11]

2024-12-13 Thread Mandy Chung
On Wed, 11 Dec 2024 02:15:32 GMT, Chen Liang wrote: >> Henry Jen 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 commits >> since

Re: RFR: 8346151: Add transformer error logging to VerifyLocalVariableTableOnRetransformTest [v2]

2024-12-13 Thread Alex Menkov
> In some circumstances ClassFileTransformer.transform can get > ClassCircularityError or LinkageError concatenating strings (see JDK-8264667, > JDK-8262002). > VerifyLocalVariableTableOnRetransformTest fails sometimes on Oracle CI. > The fix adds handling of the errors to get information for ana

Re: RFR: 8343342: java/io/File/GetXSpace.java fails on Windows with CD-ROM drive [v8]

2024-12-13 Thread Brian Burkhalter
On Fri, 13 Dec 2024 10:10:16 GMT, Taizo Kurashige wrote: >> To resolve java/io/File/GetXSpace.java failure, I fix libGetXSpace.c to use >> Cygwin’s `df` to get the size for comparison if the test target drive is a >> CD-ROM drive. >> >> As described in JDK-8343342, GetDiskSpaceInformationW ca

Re: RFR: 8343342: java/io/File/GetXSpace.java fails on Windows with CD-ROM drive [v6]

2024-12-13 Thread Brian Burkhalter
On Fri, 13 Dec 2024 10:10:22 GMT, Taizo Kurashige wrote: >>> The native `GetXSpace` method needs to be defined on all platforms >> >> This change fixes that problem: >> >> --- a/test/jdk/java/io/File/libGetXSpace.c >> +++ b/test/jdk/java/io/File/libGetXSpace.c >> @@ -160,11 +160,11 @@ Java_GetX

Re: RFR: 8346151: Add transformer error logging to VerifyLocalVariableTableOnRetransformTest

2024-12-13 Thread Chris Plummer
On Fri, 13 Dec 2024 02:21:42 GMT, Alex Menkov wrote: > In some circumstances ClassFileTransformer.transform can get > ClassCircularityError or LinkageError concatenating strings (see JDK-8264667, > JDK-8262002). > VerifyLocalVariableTableOnRetransformTest fails sometimes on Oracle CI. > The fix

Re: RFR: 8345016: [ASAN] java.c false positive ‘%s’ directive argument is null [-Werror=format-truncation=]

2024-12-13 Thread Kim Barrett
On Fri, 13 Dec 2024 09:45:27 GMT, SendaoYan wrote: > Can you try with add configure options `--enable-asan --enable-ubsan` Does either asan or ubsan alone have this problem? I was under the impression that using both at the same time could lead to strange conflicts between them, but that's an

Re: RFR: 8341402: BigDecimal's square root optimization [v31]

2024-12-13 Thread Joe Darcy
On Wed, 4 Dec 2024 14:56:02 GMT, fabioromano1 wrote: >> After changing `BigInteger.sqrt()` algorithm, this can be also used to speed >> up `BigDecimal.sqrt()` implementation. Here is how I made it. >> >> The main steps of the algorithm are as follows: >> first argument reduce the value to an in

Re: RFR: 8346202: Correct typo in SQLPermission

2024-12-13 Thread Roger Riggs
On Fri, 13 Dec 2024 16:54:05 GMT, Lance Andersen wrote: > Please review this trivial PR which removes `(See below)` which was missed > during the SQLPermission update as part of the updates for [JEP 486: > Permanently Disable the Security Manager](https://openjdk.org/jeps/486) > > I have con

Re: RFR: 8346202: Correct typo in SQLPermission

2024-12-13 Thread Sean Mullan
On Fri, 13 Dec 2024 16:54:05 GMT, Lance Andersen wrote: > Please review this trivial PR which removes `(See below)` which was missed > during the SQLPermission update as part of the updates for [JEP 486: > Permanently Disable the Security Manager](https://openjdk.org/jeps/486) > > I have con

Re: RFR: 8346202: Correct typo in SQLPermission

2024-12-13 Thread Lance Andersen
On Fri, 13 Dec 2024 20:21:49 GMT, Sean Mullan wrote: > Can you add a `jep486` label to the bug? Otherwise, looks good. Done, thank you Sean - PR Comment: https://git.openjdk.org/jdk/pull/22739#issuecomment-2542244627

RFR: 8346202: Correct typo in SQLPermission

2024-12-13 Thread Lance Andersen
Please review this trivial PR which removes `(See below)` which was missed during the SQLPermission update as part of the updates for [JEP 486: Permanently Disable the Security Manager](https://openjdk.org/jeps/486) I have confirmed there are no issues with the build via a macht tier1 run ---

Re: RFR: 8321413: IllegalArgumentException: Code length outside the allowed range while creating a jlink image [v12]

2024-12-13 Thread Henry Jen
> This PR split out large array/set construction into separate factory methods > to avoid oversized method trying to construct several of those. > > In order to do that, we will need to generate those help methods on demand in > the class builder. Here we have two approach, one is for dedup set,

Re: RFR: 8345259: Disallow ALL-MODULE-PATH without explicit --module-path [v8]

2024-12-13 Thread Mandy Chung
On Fri, 13 Dec 2024 14:15:11 GMT, Severin Gehwolf wrote: >> Please review this extension to #22609 which now disallows `ALL-MODULE-PATH` >> without explicit `--module-path` option or a non-existent module path. In >> addition, this fixes a bug mentioned in #22609 when `ALL-MODULE-PATH` and >>

Re: RFR: 8345259: Disallow ALL-MODULE-PATH without explicit --module-path [v7]

2024-12-13 Thread Mandy Chung
On Fri, 13 Dec 2024 14:11:44 GMT, Severin Gehwolf wrote: >> We have: >> - `testLimitModules()` limits on a module from the module path, `m1`. It >> expects `m1` and it's dependencies in the image. >> - `testAddModules()` limits on a module dependency, but has modules from the >> module path add

Re: RFR: 8345259: Disallow ALL-MODULE-PATH without explicit --module-path [v6]

2024-12-13 Thread Mandy Chung
On Fri, 13 Dec 2024 10:39:36 GMT, Severin Gehwolf wrote: >> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java line 441: >> >>> 439: // run-time image. Only do this if no --limit-modules >>> has been >>> 440: // specified to begin with. >>> 441:

Re: RFR: 8345259: Disallow ALL-MODULE-PATH without explicit --module-path [v8]

2024-12-13 Thread Mandy Chung
On Fri, 13 Dec 2024 14:15:11 GMT, Severin Gehwolf wrote: >> Please review this extension to #22609 which now disallows `ALL-MODULE-PATH` >> without explicit `--module-path` option or a non-existent module path. In >> addition, this fixes a bug mentioned in #22609 when `ALL-MODULE-PATH` and >>

Re: RFR: 8345185: Some tests in test/jdk/tools/jpackage fail with a JDK without JMODs

2024-12-13 Thread Mandy Chung
On Fri, 13 Dec 2024 16:15:03 GMT, Severin Gehwolf wrote: > > This method, in turn, calls `JLinkBundlerHelper.getDefaultModules()` which > > uses `Configuration.empty().resolveAndBind()` which performs the service > > binding. > > So it appears using `Configuration.empty().resolve()` instead wo

Re: [jdk24] RFR: 8345573: Module dependencies not resolved from run-time image when --limit-module is being used

2024-12-13 Thread Mandy Chung
On Fri, 13 Dec 2024 15:13:02 GMT, Severin Gehwolf wrote: > This is a clean backport of JDK-8345573 to the stabilization repo branch of > JDK 24 GA. Yes I agree. - PR Comment: https://git.openjdk.org/jdk/pull/22738#issuecomment-2541997686

Re: RFR: 8268611: jar --validate should check targeted classes in MR-JAR files

2024-12-13 Thread Alex Buckley
On 12/13/2024 7:31 AM, Christian Stein wrote: I'll update the message to read: `META-INF/versions/9/com/foo/Bar.class has class file version 69 (Java 25), but class file version 53 or less is required to target release 9 of the Java Platform` Saying "class file version 69" and "class file ver

Re: RFR: 8346120: VirtualThreadPinned event recorded for Object.wait may have wrong duration or may record second event [v2]

2024-12-13 Thread Alan Bateman
> A jdk.VirtualPinnedEvent JFR event is recorded by Object::wait when a virtual > thread waits in Object.wait while pinned. The posting of the event in > ObjectMonitor::wait is done after waiting but it can block again in > enter/ReenterI before it re-acquires. If that happens then the event dur

Re: RFR: 8346120: VirtualThreadPinned event recorded for Object.wait may have wrong duration or may record second event [v2]

2024-12-13 Thread Alan Bateman
On Fri, 13 Dec 2024 16:26:00 GMT, Patricio Chilano Mateo wrote: >> Alan Bateman has updated the pull request incrementally with one additional >> commit since the last revision: >> >> testObjectWait2 test already owns lock > > test/jdk/java/lang/Thread/virtual/MonitorPinnedEvents.java line 3

Re: Discussion: Interpretation of system property flags

2024-12-13 Thread Roger Riggs
Hi Eirik, The lack of `Boolean.getBoolean(String propName, boolean default)` encourages developers to roll their own. If it were easier get the desired default from the built-in boolean property API it would fit more use cases. It might be a small step to take advantage of your analysis and b

Re: RFR: 8268611: jar --validate should check targeted classes in MR-JAR files [v2]

2024-12-13 Thread Christian Stein
> Please review this change ensuring all targeted classes in a MR-JAR file > should target the same or a lower classfile version. The [JAR File > Specification](https://docs.oracle.com/javase/9/docs/specs/jar/jar.html#Multi-release) > of JavaSE 9 reads: > >> A class file under a versioned direc

Re: RFR: 8346120: VirtualThreadPinned event recorded for Object.wait may have wrong duration or may record second event

2024-12-13 Thread Patricio Chilano Mateo
On Thu, 12 Dec 2024 17:09:09 GMT, Alan Bateman wrote: > A jdk.VirtualPinnedEvent JFR event is recorded by Object::wait when a virtual > thread waits in Object.wait while pinned. The posting of the event in > ObjectMonitor::wait is done after waiting but it can block again in > enter/ReenterI b

Re: RFR: 8345185: Some tests in test/jdk/tools/jpackage fail with a JDK without JMODs

2024-12-13 Thread Severin Gehwolf
On Fri, 13 Dec 2024 16:14:13 GMT, Severin Gehwolf wrote: > This method, in turn, calls `JLinkBundlerHelper.getDefaultModules()` which > uses `Configuration.empty().resolveAndBind()` which performs the service > binding. So it appears using `Configuration.empty().resolve()` instead would fix th

Re: RFR: 8345185: Some tests in test/jdk/tools/jpackage fail with a JDK without JMODs

2024-12-13 Thread Severin Gehwolf
On Tue, 10 Dec 2024 17:14:32 GMT, Mandy Chung wrote: > Can you clarify how `jdk.jpackage` and `jdk.jlink` are included in > `ALL-DEFAULT`? They do not have unqualified exports and hence they are not in > the default set of root modules. They are service providers of > `ToolProvider`. However,

Re: RFR: 8343829: Unify decimal and hexadecimal parsing in FloatingDecimal [v3]

2024-12-13 Thread Raffaello Giulietti
> See the JBS bug for some details. Raffaello Giulietti 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 five additional commits since the last revision

Re: [jdk24] RFR: 8345573: Module dependencies not resolved from run-time image when --limit-module is being used

2024-12-13 Thread Severin Gehwolf
On Fri, 13 Dec 2024 15:13:02 GMT, Severin Gehwolf wrote: > This is a clean backport of JDK-8345573 to the stabilization repo branch of > JDK 24 GA. @mlchung I'd like to bring this and #22494 to JDK 24 stabilization as well. OK with you? - PR Comment: https://git.openjdk.org/jdk/p

Re: RFR: 8268611: jar --validate should check targeted classes in MR-JAR files

2024-12-13 Thread Christian Stein
On Thu, 14 Nov 2024 11:57:52 GMT, Christian Stein wrote: > Please review this change ensuring all targeted classes in a MR-JAR file > should target the same or a lower classfile version. The [JAR File > Specification](https://docs.oracle.com/javase/9/docs/specs/jar/jar.html#Multi-release) > of

Re: RFR: 8343829: Unify decimal and hexadecimal parsing in FloatingDecimal [v2]

2024-12-13 Thread Raffaello Giulietti
> See the JBS bug for some details. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: Removed repeated comment. - Changes: - all: https://git.openjdk.org/jdk/pull/22737/files - new: https://git.openjdk.org/jdk/p

Re: High cost of failed Math.*Exact calls

2024-12-13 Thread Roger Riggs
Hi, Another API alternative would be to add a version that triggers a lambda on overflow and allow the caller to determine the value or throw. public static long multiplyExact(long x,long y,LongBinaryOperator recompute) { long r =x *y; long ax =Math.abs(x); long ay =Math.abs(y);

[jdk24] RFR: 8345573: Module dependencies not resolved from run-time image when --limit-module is being used

2024-12-13 Thread Severin Gehwolf
This is a clean backport of JDK-8345573 to the stabilization repo branch of JDK 24 GA. - Commit messages: - Backport 11cd639842b61952755ad83e88446c91237c19f5 Changes: https://git.openjdk.org/jdk/pull/22738/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22738&range=00 Is

RFR: 8343829: Unify decimal and hexadecimal parsing in FloatingDecimal

2024-12-13 Thread Raffaello Giulietti
See the JBS bug for some details. - Commit messages: - Refactoring some code and comments. - 8343829: Unify decimal and hexadecimal parsing in FloatingDecimal Changes: https://git.openjdk.org/jdk/pull/22737/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22737&range=00 I

Re: RFR: 8345259: Disallow ALL-MODULE-PATH without explicit --module-path [v7]

2024-12-13 Thread Severin Gehwolf
On Fri, 13 Dec 2024 14:00:46 GMT, Severin Gehwolf wrote: >> test/jdk/tools/jlink/basic/AllModulePath.java line 220: >> >>> 218: */ >>> 219: @Test >>> 220: public void modulePathWithLimitMods() throws Exception { >> >> Is this test case different than `testLimitModules` which does >

Re: RFR: 8345259: Disallow ALL-MODULE-PATH without explicit --module-path [v8]

2024-12-13 Thread Severin Gehwolf
> Please review this extension to #22609 which now disallows `ALL-MODULE-PATH` > without explicit `--module-path` option or a non-existent module path. In > addition, this fixes a bug mentioned in #22609 when `ALL-MODULE-PATH` and > `--limit-modules` are used in combination. It failed earlier an

Re: RFR: 8345259: Disallow ALL-MODULE-PATH without explicit --module-path [v7]

2024-12-13 Thread Severin Gehwolf
On Thu, 12 Dec 2024 19:17:55 GMT, Mandy Chung wrote: >> Severin Gehwolf has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 31 commits: >> >> - Guard test execution >> - Merge branch 'master' into jdk-8345259-all-module-path-fix >>

Re: RFR: 8345259: Disallow ALL-MODULE-PATH without explicit --module-path [v6]

2024-12-13 Thread Severin Gehwolf
On Thu, 12 Dec 2024 19:02:48 GMT, Mandy Chung wrote: >> Severin Gehwolf has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 20 commits: >> >> - More test clean-ups >> - Merge two AllModulePath tests >> - Better error message with n

Re: RFR: 8345259: Disallow ALL-MODULE-PATH without explicit --module-path [v6]

2024-12-13 Thread Severin Gehwolf
On Thu, 12 Dec 2024 18:41:51 GMT, Mandy Chung wrote: >> Severin Gehwolf has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 20 commits: >> >> - More test clean-ups >> - Merge two AllModulePath tests >> - Better error message with n

Re: RFR: 8345506: jar --validate may lead to java.nio.file.FileAlreadyExistsException

2024-12-13 Thread Jaikiran Pai
On Fri, 13 Dec 2024 13:31:01 GMT, Alan Bateman wrote: >> Can I please get a review of this change which proposes to address the issue >> reported in https://bugs.openjdk.org/browse/JDK-8345506? >> >> The `jar` tool has several operations which take `--file` as a parameter. >> The value for tha

Re: RFR: 8345506: jar --validate may lead to java.nio.file.FileAlreadyExistsException

2024-12-13 Thread Alan Bateman
On Fri, 13 Dec 2024 13:17:39 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which proposes to address the issue > reported in https://bugs.openjdk.org/browse/JDK-8345506? > > The `jar` tool has several operations which take `--file` as a parameter. The > value for that opt

RFR: 8345506: jar --validate may lead to java.nio.file.FileAlreadyExistsException

2024-12-13 Thread Jaikiran Pai
Can I please get a review of this change which proposes to address the issue reported in https://bugs.openjdk.org/browse/JDK-8345506? The `jar` tool has several operations which take `--file` as a parameter. The value for that option is a JAR file path. The `jar` operation is then run against t

Re: High cost of failed Math.*Exact calls

2024-12-13 Thread Raffaello Giulietti
On 2024-12-12 23:58, Charles Oliver Nutter wrote: Question two: Am I losing the benefits of *Exact if I use the following code to "pre-check" for overflow? long high = Math.multiplyHigh(a, b); if (high == 0) return Math.multiplyExact(a, b); return bigIntegerMultiply(a, b); For your spec

Re: RFR: 8268611: jar --validate should check targeted classes in MR-JAR files

2024-12-13 Thread Jorn Vernee
On Thu, 14 Nov 2024 11:57:52 GMT, Christian Stein wrote: > Please review this change ensuring all targeted classes in a MR-JAR file > should target the same or a lower classfile version. The [JAR File > Specification](https://docs.oracle.com/javase/9/docs/specs/jar/jar.html#Multi-release) > of

RFR: 8346120: VirtualThreadPinned event recorded for Object.wait may have wrong duration or may record second event

2024-12-13 Thread Alan Bateman
A jdk.VirtualPinnedEvent JFR event is recorded by Object::wait when a virtual thread waits in Object.wait while pinned. The posting of the event in ObjectMonitor::wait is done after waiting but it can block again in enter/ReenterI before it re-acquires. If that happens then the event duration w

Re: RFR: 8342468: Improve API documentation for java.lang.classfile.constantpool [v2]

2024-12-13 Thread Adam Sotona
On Thu, 12 Dec 2024 00:20:13 GMT, Chen Liang wrote: >> Improve documentation for constant pool entries. This include some models >> for those entries, symbolic descriptors, and some general guidance in >> package summary. >> >> APIDiff: https://cr.openjdk.org/~liach/apidiff/cf-consts/ >> Java

Re: RFR: 8346101: [JVMCI] Export jdk.internal.misc to jdk.graal.compiler [v2]

2024-12-13 Thread Doug Simon
On Fri, 13 Dec 2024 08:35:11 GMT, Volker Simonis wrote: >> In the past, the Graal Compiler used `sun.misc.Unsafe` but these usages were >> recently changed to `jdk.internal.misc.Unsafe` [1]. We should therefor >> export `jdk.internal.misc` to `jdk.graal.compiler` which is an upgradeable >> mod

Re: RFR: 8345259: Disallow ALL-MODULE-PATH without explicit --module-path [v6]

2024-12-13 Thread Severin Gehwolf
On Thu, 12 Dec 2024 19:06:00 GMT, Mandy Chung wrote: >> Severin Gehwolf has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 20 commits: >> >> - More test clean-ups >> - Merge two AllModulePath tests >> - Better error message with n

Re: RFR: 8345259: Disallow ALL-MODULE-PATH without explicit --module-path [v6]

2024-12-13 Thread Severin Gehwolf
On Thu, 12 Dec 2024 17:52:45 GMT, Mandy Chung wrote: >> Severin Gehwolf has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 20 commits: >> >> - More test clean-ups >> - Merge two AllModulePath tests >> - Better error message with n

Re: RFR: 8343342: java/io/File/GetXSpace.java fails on Windows with CD-ROM drive [v6]

2024-12-13 Thread Taizo Kurashige
On Wed, 11 Dec 2024 18:45:43 GMT, Brian Burkhalter wrote: >> test/jdk/java/io/File/libGetXSpace.c line 165: >> >>> 163: #ifdef WINDOWS >>> 164: JNIEXPORT jboolean JNICALL >>> 165: Java_GetXSpace_isCDDrive >> >> The native `GetXSpace` method needs to be defined on all platforms, >> otherwise we

Re: RFR: 8343342: java/io/File/GetXSpace.java fails on Windows with CD-ROM drive [v6]

2024-12-13 Thread Taizo Kurashige
On Thu, 12 Dec 2024 23:20:51 GMT, Brian Burkhalter wrote: >> Taizo Kurashige has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add ifdef WINDOWS > > test/jdk/java/io/File/GetXSpace.java line 415: > >> 413: private static native boolea

Re: RFR: 8343342: java/io/File/GetXSpace.java fails on Windows with CD-ROM drive [v8]

2024-12-13 Thread Taizo Kurashige
> To resolve java/io/File/GetXSpace.java failure, I fix libGetXSpace.c to use > Cygwin’s `df` to get the size for comparison if the test target drive is a > CD-ROM drive. > > As described in JDK-8343342, GetDiskSpaceInformationW can't get information > about the size of the CD-ROM drive. > Ge

Re: RFR: 8343342: java/io/File/GetXSpace.java fails on Windows with CD-ROM drive [v7]

2024-12-13 Thread Taizo Kurashige
> To resolve java/io/File/GetXSpace.java failure, I fix libGetXSpace.c to use > Cygwin’s `df` to get the size for comparison if the test target drive is a > CD-ROM drive. > > As described in JDK-8343342, GetDiskSpaceInformationW can't get information > about the size of the CD-ROM drive. > Ge

Re: RFR: 8345016: [ASAN] java.c false positive ‘%s’ directive argument is null [-Werror=format-truncation=]

2024-12-13 Thread SendaoYan
On Wed, 4 Dec 2024 15:42:33 GMT, SendaoYan wrote: >> Hello @sendaoYan, what exact version of `gcc` is this? > >> Hello @sendaoYan, what exact version of `gcc` is this? > > Hi, the gcc version is gcc14.2.0 > > >> gcc -v > Using built-in specs. > COLLECT_GCC=gcc > COLLECT_LTO_WRAPPER=/home/yanse

Re: RFR: 8345016: [ASAN] java.c false positive ‘%s’ directive argument is null [-Werror=format-truncation=]

2024-12-13 Thread Jaikiran Pai
On Wed, 4 Dec 2024 15:42:33 GMT, SendaoYan wrote: >> Hello @sendaoYan, what exact version of `gcc` is this? > >> Hello @sendaoYan, what exact version of `gcc` is this? > > Hi, the gcc version is gcc14.2.0 > > >> gcc -v > Using built-in specs. > COLLECT_GCC=gcc > COLLECT_LTO_WRAPPER=/home/yanse

Re: RFR: 8346101: [JVMCI] Export jdk.internal.misc to jdk.graal.compiler [v2]

2024-12-13 Thread Volker Simonis
> In the past, the Graal Compiler used `sun.misc.Unsafe` but these usages were > recently changed to `jdk.internal.misc.Unsafe` [1]. We should therefor export > `jdk.internal.misc` to `jdk.graal.compiler` which is an upgradeable module in > the JDK. > > [1] Remove sun.misc.Unsafe plugins > (ht

Re: High cost of failed Math.*Exact calls

2024-12-13 Thread Remi Forax
Hello, as far as i remember, c2 is alble to transform a try { Math.somethingExact(...) } catch(ArithmeticException e) { ... } to a jump on overflow ("jo") if the catch and the method call to Math.somethingExact() are in the same inlining horizon. If you want a garantee that this optimizat