Re: RFR: 8287908: Use non-cloning reflection methods where acceptable [v2]

2022-09-07 Thread Сергей Цыпанов
On Wed, 7 Sep 2022 19:33:41 GMT, Roger Riggs wrote: >> You can probably appreciate how hard it is to keep track of what's a copy >> (and needs to be copied) and what's not through several levels of APIs. From >> a security perspective, its better to spend a little extra at runtime, than >> to

Re: RFR: 8279283 - BufferedInputStream should override transferTo [v9]

2022-09-07 Thread Markus KARG
On Thu, 8 Sep 2022 06:32:59 GMT, Alan Bateman wrote: >> The correctness of the actually written data is already checked in >> `checkTransferredContents`. I do not see what you win by replacing >> `ByteArrayInputStream` by `FileInputStream`. What additional risks do you >> cover, and what is so

Re: RFR: 8279283 - BufferedInputStream should override transferTo [v9]

2022-09-07 Thread Alan Bateman
On Thu, 8 Sep 2022 06:19:22 GMT, Markus KARG wrote: >> test/jdk/java/io/BufferedInputStream/TransferTo.java line 105: >> >>> 103: public void testStreamContents() throws Exception { >>> 104: // factory for incoming data provider >>> 105: InputStreamProvider inputStreamProvide

Re: RFR: 8279283 - BufferedInputStream should override transferTo [v9]

2022-09-07 Thread Markus KARG
On Thu, 8 Sep 2022 05:53:34 GMT, Jaikiran Pai wrote: >> Markus KARG has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Revert "HexPrinter::transferTo" >> >> This reverts commit 6f0e2a8f7be5706b39a8e9bc88a97f34d2819098. > > test/jdk/jav

Re: RFR: 8279283 - BufferedInputStream should override transferTo [v9]

2022-09-07 Thread Markus KARG
On Thu, 8 Sep 2022 05:07:24 GMT, Jaikiran Pai wrote: >> Markus KARG has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Revert "HexPrinter::transferTo" >> >> This reverts commit 6f0e2a8f7be5706b39a8e9bc88a97f34d2819098. > > test/jdk/jav

Re: RFR: 8279283 - BufferedInputStream should override transferTo [v9]

2022-09-07 Thread Jaikiran Pai
On Tue, 6 Sep 2022 17:20:22 GMT, Markus KARG wrote: >> Implementation of JDK-8279283 > > Markus KARG has updated the pull request incrementally with one additional > commit since the last revision: > > Revert "HexPrinter::transferTo" > > This reverts commit 6f0e2a8f7be5706b39a8e9bc88a97f

Re: RFR: 8279283 - BufferedInputStream should override transferTo [v9]

2022-09-07 Thread Jaikiran Pai
On Tue, 6 Sep 2022 17:20:22 GMT, Markus KARG wrote: >> Implementation of JDK-8279283 > > Markus KARG has updated the pull request incrementally with one additional > commit since the last revision: > > Revert "HexPrinter::transferTo" > > This reverts commit 6f0e2a8f7be5706b39a8e9bc88a97f

Re: RFR: 8291660: Grapheme support in BreakIterator [v4]

2022-09-07 Thread Stuart Marks
On Fri, 26 Aug 2022 21:48:14 GMT, Naoto Sato wrote: >> This is to enhance the character break analysis in `java.text.BreakIterator` >> to conform to the extended grapheme cluster boundaries defined in >> https://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries. A >> corresponding CSR

Re: RFR: 8289613: Drop use of Thread.stop in jshell [v4]

2022-09-07 Thread ExE Boss
On Tue, 6 Sep 2022 09:14:47 GMT, Adam Sotona wrote: >> LocalExecutionControl in jdk.jshell actually uses Thread::stop to cancel >> execution of (long-running or infinite loops) user code in JShell, however >> Thread::stop is deprecated and planned for removal. >> >> Proposed patch instruments

Re: RFR: 8293496: ProblemList runtime/os/TestTracePageSizes.java on linux-x64

2022-09-07 Thread Daniel D . Daugherty
On Wed, 7 Sep 2022 15:20:54 GMT, Alexander Zvegintsev wrote: >> A trivial fix to ProblemList runtime/os/TestTracePageSizes.java on linux-x64. > > Marked as reviewed by azvegint (Reviewer). @azvegint - Thanks for your review also. (Just caught up on the email thread). - PR: https:/

Re: RFR: 8287908: Use non-cloning reflection methods where acceptable [v3]

2022-09-07 Thread Roger Riggs
On Tue, 14 Jun 2022 19:36:51 GMT, Сергей Цыпанов wrote: >> Instead of `Executable.getParameterTypes()` we could use >> `Executable.getSharedParameterTypes()` in trusted code. Same is applicable >> for `Executable.getExceptionTypes()`. > > Сергей Цыпанов has updated the pull request incrementall

Re: RFR: 8287908: Use non-cloning reflection methods where acceptable [v2]

2022-09-07 Thread Roger Riggs
On Tue, 14 Jun 2022 19:54:44 GMT, Roger Riggs wrote: >> Right, I was looking into usages of `getAllGenericParameterTypes()` and all >> of them are read-only. However I agree that later it might become an issue, >> so I'd use `getParameterTypes()` in line 345. > > You can probably appreciate how

Re: RFR: 8287908: Use non-cloning reflection methods where acceptable [v3]

2022-09-07 Thread Сергей Цыпанов
On Tue, 14 Jun 2022 19:36:51 GMT, Сергей Цыпанов wrote: >> Instead of `Executable.getParameterTypes()` we could use >> `Executable.getSharedParameterTypes()` in trusted code. Same is applicable >> for `Executable.getExceptionTypes()`. > > Сергей Цыпанов has updated the pull request incrementall

Re: [External] : Re: jpackage OS/X --app-image signing

2022-09-07 Thread Alexander Matveev
Hi Michael, I file following issue for this: https://bugs.openjdk.org/browse/JDK-8293462 Yes, you right it is related to JDK-8289030. I put suggested workaround to https://bugs.openjdk.org/browse/JDK-8293462 in comment section. There are two possible workarounds: 1) Generate signed application

Re: RFR: 8289613: Drop use of Thread.stop in jshell [v4]

2022-09-07 Thread Alan Bateman
On Wed, 7 Sep 2022 18:35:37 GMT, Jan Lahoda wrote: > Not sure what you mean - as far as I can tell, neither the generated class, > nor the snippets access `LocalExecutionControl.allStop`. Okay, I see it now. REPL.$Cancel$.allStop is public so there is no issue accessing it from LEC.invoke. -

Integrated: 8293146: Strict DateTimeFormatter fails to report an invalid week 53

2022-09-07 Thread Naoto Sato
On Tue, 6 Sep 2022 17:30:27 GMT, Naoto Sato wrote: > Fixed the max week number on parsing the week of week-based year field in > strict mode. It used to be always returning the largest maximum, which should > be adjusted by the actual week-based year. This pull request has now been integrated.

Re: RFR: 8289613: Drop use of Thread.stop in jshell [v4]

2022-09-07 Thread Jan Lahoda
On Wed, 7 Sep 2022 18:22:21 GMT, Alan Bateman wrote: > Would it be possible to summarize how the loader delegate work in jshell? > Instrumenting the code to invoke REPL/$Cancel$.stopCheck looks reasonable but > I can't immediately see how the generated REPL/$Cancel$ has access to > LocalExecut

Re: RFR: 8289613: Drop use of Thread.stop in jshell [v4]

2022-09-07 Thread Jan Lahoda
On Tue, 6 Sep 2022 09:14:47 GMT, Adam Sotona wrote: >> LocalExecutionControl in jdk.jshell actually uses Thread::stop to cancel >> execution of (long-running or infinite loops) user code in JShell, however >> Thread::stop is deprecated and planned for removal. >> >> Proposed patch instruments

Re: RFR: 8289613: Drop use of Thread.stop in jshell [v4]

2022-09-07 Thread Alan Bateman
On Tue, 6 Sep 2022 09:14:47 GMT, Adam Sotona wrote: >> LocalExecutionControl in jdk.jshell actually uses Thread::stop to cancel >> execution of (long-running or infinite loops) user code in JShell, however >> Thread::stop is deprecated and planned for removal. >> >> Proposed patch instruments

Re: RFR: 8293146: Strict DateTimeFormatter fails to report an invalid week 53 [v2]

2022-09-07 Thread Roger Riggs
On Tue, 6 Sep 2022 19:06:45 GMT, Naoto Sato wrote: >> Fixed the max week number on parsing the week of week-based year field in >> strict mode. It used to be always returning the largest maximum, which >> should be adjusted by the actual week-based year. > > Naoto Sato has updated the pull requ

Re: RFR: 8290313: Produce warning when user specified java.io.tmpdir directory doesn't exist

2022-09-07 Thread Alan Bateman
On Tue, 23 Aug 2022 18:32:30 GMT, Weibing Xiao wrote: > 8290313: Produce warning when user specified java.io.tmpdir directory doesn't > exist src/java.base/share/classes/java/io/File.java line 1992: > 1990: > 1991: // print out the error message for java.io.tmpdir setting > 1992:

Re: RFR: 8279283 - BufferedInputStream should override transferTo [v9]

2022-09-07 Thread Сергей Цыпанов
On Tue, 6 Sep 2022 17:20:22 GMT, Markus KARG wrote: >> Implementation of JDK-8279283 > > Markus KARG has updated the pull request incrementally with one additional > commit since the last revision: > > Revert "HexPrinter::transferTo" > > This reverts commit 6f0e2a8f7be5706b39a8e9bc88a97f

Integrated: 8293496: ProblemList runtime/os/TestTracePageSizes.java on linux-x64

2022-09-07 Thread Daniel D . Daugherty
On Wed, 7 Sep 2022 15:18:29 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList runtime/os/TestTracePageSizes.java on linux-x64. This pull request has now been integrated. Changeset: d36abbe8 Author:Daniel D. Daugherty URL: https://git.openjdk.org/jdk/commit/d36abbe8dab36

Re: RFR: 8290313: Produce warning when user specified java.io.tmpdir directory doesn't exist

2022-09-07 Thread Weibing Xiao
On Wed, 24 Aug 2022 04:42:54 GMT, David Schlosnagle wrote: >> 8290313: Produce warning when user specified java.io.tmpdir directory >> doesn't exist > > src/java.base/share/classes/java/io/File.java line 2180: > >> 2178: >> 2179: >> 2180: if(!tmpdir.exists() || !tmpdir.canWrite()) { >

Re: RFR: 8290313: Produce warning when user specified java.io.tmpdir directory doesn't exist

2022-09-07 Thread David Schlosnagle
On Tue, 23 Aug 2022 18:32:30 GMT, Weibing Xiao wrote: > 8290313: Produce warning when user specified java.io.tmpdir directory doesn't > exist src/java.base/share/classes/java/io/File.java line 2180: > 2178: > 2179: > 2180: if(!tmpdir.exists() || !tmpdir.canWrite()) { Should this che

Re: RFR: 8290313: Produce warning when user specified java.io.tmpdir directory doesn't exist

2022-09-07 Thread Weibing Xiao
On Tue, 23 Aug 2022 18:32:30 GMT, Weibing Xiao wrote: > 8290313: Produce warning when user specified java.io.tmpdir directory doesn't > exist CSR https://bugs.openjdk.org/browse/JDK-8293246 - PR: https://git.openjdk.org/jdk/pull/9989

RFR: 8290313: Produce warning when user specified java.io.tmpdir directory doesn't exist

2022-09-07 Thread Weibing Xiao
8290313: Produce warning when user specified java.io.tmpdir directory doesn't exist - Commit messages: - new approach - change based on the review - updating according to the comments - Merge branch 'master' of https://github.com/openjdk/jdk into improve-directory-not-existing-e

Integrated: JDK-8289798: Update to use jtreg 7

2022-09-07 Thread Christian Stein
On Wed, 6 Jul 2022 08:24:21 GMT, Christian Stein wrote: > Please review the change to update to using jtreg 7. > > The primary change is to the `jib-profiles.js` file, which specifies the > version of jtreg to use, for those systems that rely on this file. In > addition, the `requiredVersion`

Re: RFR: 8279283 - BufferedInputStream should override transferTo [v9]

2022-09-07 Thread Markus KARG
On Tue, 6 Sep 2022 17:20:22 GMT, Markus KARG wrote: >> Implementation of JDK-8279283 > > Markus KARG has updated the pull request incrementally with one additional > commit since the last revision: > > Revert "HexPrinter::transferTo" > > This reverts commit 6f0e2a8f7be5706b39a8e9bc88a97f

Re: jpackage OS/X --app-image signing

2022-09-07 Thread Michael Hall
> On Sep 6, 2022, at 8:00 PM, Michael Hall wrote: > > > >> On Sep 6, 2022, at 4:52 PM, Michael Hall wrote: >> >> >> >>> On Sep 6, 2022, at 4:48 PM, Alexander Matveev >>> wrote: >>> >>> Hi Michael, >>> >>> Did you generate application image with same JDK version (19+36-2238)? With >>>

Re: RFR: JDK-8292914: Introduce a system property that enables stable names for lambda classes

2022-09-07 Thread Strahinja Stanojevic
On Tue, 6 Sep 2022 16:47:03 GMT, Ioi Lam wrote: > Have you tested with method references? Two references to the same method > will result in a single `JVM_CONSTANT_InvokeDynamic` constant pool entry in > the classfile, but it's invoked by two callsites. As a result, two different > lambda prox

Re: RFR: JDK-8292914: Introduce a system property that enables stable names for lambda classes [v2]

2022-09-07 Thread Strahinja Stanojevic
> This PR introduces a system property that creates stable names for the lambda > classes in the JDK. Instead of using an atomic counter in the lambda name, we > can use a 32-bit hash after `$$Lambda$`. Thus, the name becomes > `lambdaCapturingClass$$Lambda$hashValue`. > Parameters used to creat

Re: RFR: 8279283 - BufferedInputStream should override transferTo [v9]

2022-09-07 Thread Markus KARG
On Tue, 6 Sep 2022 17:20:22 GMT, Markus KARG wrote: >> Implementation of JDK-8279283 > > Markus KARG has updated the pull request incrementally with one additional > commit since the last revision: > > Revert "HexPrinter::transferTo" > > This reverts commit 6f0e2a8f7be5706b39a8e9bc88a97f

Re: RFR: 8279283 - BufferedInputStream should override transferTo [v7]

2022-09-07 Thread Alan Bateman
On Tue, 6 Sep 2022 16:29:39 GMT, Alan Bateman wrote: >> BIS dates from JDK 1.0 and it's not hard to find examples that extend it. >> The HexPrinter test reminds us that it has been possible for 25+ years to >> override the read methods and snoop on all bytes that are read. Adding an >> overrid