Re: RFR: 8280642: IllegalAccessError thrown by ObjectInputStream.resolveProxyClass is not handled

2022-01-28 Thread Mandy Chung
On Fri, 28 Jan 2022 21:02:23 GMT, Roger Riggs wrote: > During deserialization of a serialized data stream that contains a proxy > descriptor with non-public interfaces > `java.io.ObjectInputStream` checks that the interfaces can be loaded from a > single classloader in

Re: RFR: 8280889: java/lang/instrument/GetObjectSizeIntrinsicsTest.java fails with -XX:-UseCompressedOops

2022-01-28 Thread Serguei Spitsyn
On Fri, 28 Jan 2022 15:37:59 GMT, Aleksey Shipilev wrote: > Recent test regression after adding new cases in the test. Without compressed > oops, ~1G elements `Object[]` array takes >8G of memory, which fails the > test. The fix cuts it down to 512M when reference size is 8 bytes. >

Re: RFR: 8280642: IllegalAccessError thrown by ObjectInputStream.resolveProxyClass is not handled

2022-01-28 Thread Roger Riggs
On Fri, 28 Jan 2022 23:54:54 GMT, Mandy Chung wrote: > `ObjectInputStream::readObject` does not specify that > `InvalidObjectException` may be thrown. > Have you considered throwing `InvalidClassException` be an alternative? i.e. > extend `InvalidClassException` to report failure in creating

Re: RFR: 8280642: IllegalAccessError thrown by ObjectInputStream.resolveProxyClass is not handled

2022-01-28 Thread Mandy Chung
On Fri, 28 Jan 2022 21:02:23 GMT, Roger Riggs wrote: > During deserialization of a serialized data stream that contains a proxy > descriptor with non-public interfaces > `java.io.ObjectInputStream` checks that the interfaces can be loaded from a > single classloader in

Re: RFR: 8280642: IllegalAccessError thrown by ObjectInputStream.resolveProxyClass is not handled

2022-01-28 Thread Naoto Sato
On Fri, 28 Jan 2022 21:02:23 GMT, Roger Riggs wrote: > During deserialization of a serialized data stream that contains a proxy > descriptor with non-public interfaces > `java.io.ObjectInputStream` checks that the interfaces can be loaded from a > single classloader in

RFR: 8280642: IllegalAccessError thrown by ObjectInputStream.resolveProxyClass is not handled

2022-01-28 Thread Roger Riggs
During deserialization of a serialized data stream that contains a proxy descriptor with non-public interfaces `java.io.ObjectInputStream` checks that the interfaces can be loaded from a single classloader in `ObjectInputStream.resolveProxyClass`. If the interfaces cannot be loaded from a single

Re: Proposed JEP: Safer Process Launch by ProcessBuilder and Runtime.exec

2022-01-28 Thread Roger Riggs
Hi Raffaello, My mistake, the problem with empty args was fixed in 17 as well as some of the problems with escaping of double-quotes.  The default legacy mode does not check for unbalanced quotes possible merging of arguments.  The simplest case are for .exe execution, in which the argument

Re: RFR: 8279598: Provide adapter from RandomGenerator to Random [v2]

2022-01-28 Thread Stuart Marks
On Fri, 28 Jan 2022 01:06:47 GMT, liach wrote: >> Commited the change on df78e05e3e692e2189c9d318fbd4892a4b96a55f > > Will we gradually phase out the `Random` class? If yes, we should put this > conversion method in `Random` so that we don't break the newer API shall > `Random` be retired. I

Re: Proposed JEP: Safer Process Launch by ProcessBuilder and Runtime.exec

2022-01-28 Thread Raffaello Giulietti
Hi Roger, I'm trying the following (ugly) code on JDK 17/Win, where Args.exe does nothing else than writing out its argv[], redirecting to a log file. public static void main(String[] args) throws IOException, InterruptedException { String[] command = {

Re: Fix proposal for bug JDK-8221642

2022-01-28 Thread Mandy Chung
Your proposal is essentially for all JNI code with no caller frame to default to java.base, which gets all permissions.  It means that it could break encapsulation to access any members.  Arguably one could consider JNI have superpower.  In addition, default to java.base may not make sense for

Re: RFR: JDK-8277175 : Add a parallel multiply method to BigInteger [v9]

2022-01-28 Thread kabutz
On Fri, 28 Jan 2022 18:59:56 GMT, kabutz wrote: >> BigInteger currently uses three different algorithms for multiply. The >> simple quadratic algorithm, then the slightly better Karatsuba if we exceed >> a bit count and then Toom Cook 3 once we go into the several thousands of >> bits. Since

Re: RFR: JDK-8277175 : Add a parallel multiply method to BigInteger [v9]

2022-01-28 Thread kabutz
> BigInteger currently uses three different algorithms for multiply. The simple > quadratic algorithm, then the slightly better Karatsuba if we exceed a bit > count and then Toom Cook 3 once we go into the several thousands of bits. > Since Toom Cook 3 is a recursive algorithm, it is trivial to

Re: Additional Date-Time Formats

2022-01-28 Thread Naoto Sato
Updated the CSR based on your inputs. On 1/27/22 2:34 PM, Stephen Colebourne wrote: On Thu, 27 Jan 2022 at 19:23, Naoto Sato wrote: Now come to think of it, I came up with the draft based on `ofPattern()` methods. One of them is a overload method that takes a Locale argument. Why is it so?

Re: RFR: JDK-8280534: Enable compile-time doclint reference checking [v2]

2022-01-28 Thread Iris Clark
On Fri, 28 Jan 2022 02:15:59 GMT, Joe Darcy wrote: >> The changes in this PR on top of the out-for-review changes in >> https://git.openjdk.java.net/jdk/pull/7222 allow compile-time doclint >> checking to be enabled in all JDK modules. >> >> Typically, a @SuppressWarnings("doclint:refernce")

RFR: JDK-8221642: AccessibleObject::setAccessible throws NPE when invoked by JNI code with no java frame on stack

2022-01-28 Thread Mandy Chung
`AccessibleObject::setAccessible` and `trySetAccessible` methods should only allow access to public member of a public type that is unconditionally exported consistent with the access check as described in the class specification, when invoked by JNI code with no Java class on the stack. The

Re: RFR: 8278753: Runtime crashes with access violation during JNI_CreateJavaVM call

2022-01-28 Thread Yumin Qi
On Wed, 26 Jan 2022 08:59:49 GMT, Alan Bateman wrote: >> Please review, >> When jlink with --compress=2, zip is used to compress the files while >> doing copy. The user case failed to load zip.dll, since zip.dll is not set >> in PATH. This failure is after we get NULL from

RE: Pull Request: 7013: AIX: InetAddress.getByName(addr) does not work as expected

2022-01-28 Thread Michael Felt
Thanks Alan - for opening the ticket. (Open my eyes). Still need to know if I am expected to repond to the ticket, and if so - how. -Original Message- From: Alan Bateman Sent: Saturday, 22 January 2022 11:00 To: Thomas Stüfe ; Michael Felt Cc: ppc-aix-port-dev ; Java Core Libs

RE: Fix proposal for bug JDK-8221642

2022-01-28 Thread Andreas Rosenberg
Hi Mandy, thanks for looking at my problem. Yes, "setAccessible" is one of the problems, but our main issue is related to "ResourceBundle". I've created a small example that shows the problem: https://github.com/anrose00/JniSensitiveCaller Any comments on my proposal would be great. Andreas

Re: RFR: 8279842: HTTPS Channel Binding support for Java GSS/Kerberos [v13]

2022-01-28 Thread Daniel Fuchs
On Fri, 28 Jan 2022 16:58:55 GMT, Michael McMahon wrote: >> Hi, >> >> This change adds Channel Binding Token (CBT) support to HTTPS >> (java.net.HttpsURLConnection) when used with the Negotiate (SPNEGO, >> Kerberos) authentication scheme. When enabled, the implementation >> preemptively

Re: RFR: 8279842: HTTPS Channel Binding support for Java GSS/Kerberos [v13]

2022-01-28 Thread Michael McMahon
> Hi, > > This change adds Channel Binding Token (CBT) support to HTTPS > (java.net.HttpsURLConnection) when used with the Negotiate (SPNEGO, Kerberos) > authentication scheme. When enabled, the implementation preemptively includes > a CBT with authentication requests over Kerberos. The

Re: RFR: 8279598: Provide adapter from RandomGenerator to Random [v2]

2022-01-28 Thread Roger Riggs
On Fri, 28 Jan 2022 00:36:01 GMT, Yasser Bazzi wrote: >> Hi, could i get a review on this implementation proposed by Stuart Marks, i >> decided to use the >> https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/random/RandomGenerator.html >> interface to create the default

Re: Proposed JEP: Safer Process Launch by ProcessBuilder and Runtime.exec

2022-01-28 Thread Roger Riggs
Hi Raffaello, For .exe executables, one example is an empty string in the list of arguments to ProcessBuilder. The empty string is not visible in the generated command line. For position sensitive commands, it appears the argument is dropped. An argument in ProcessBuilder with mismatched

RFR: 8280889: java/lang/instrument/GetObjectSizeIntrinsicsTest.java fails with -XX:-UseCompressedOops

2022-01-28 Thread Aleksey Shipilev
Recent test regression after adding new cases in the test. Without compressed oops, ~1G elements `Object[]` array takes >8G of memory, which fails the test. The fix cuts it down to 512M when reference size is 8 bytes. Additionally, `ObjectAlignmentInBytes=32` is excessive for new test configs.

Re: RFR: JDK-8277175 : Add a parallel multiply method to BigInteger [v7]

2022-01-28 Thread kabutz
On Fri, 14 Jan 2022 09:15:37 GMT, kabutz wrote: >>> > embarrassingly parallelizable >>> >>> Having looked at [embarrassingly >>> parallel](https://en.wikipedia.org/wiki/Embarrassingly_parallel), I'm not >>> certain that this particular problem would qualify. The algorithm is easy >>> to

Re: RFR: JDK-8280534: Enable compile-time doclint reference checking [v2]

2022-01-28 Thread Lance Andersen
On Fri, 28 Jan 2022 02:15:59 GMT, Joe Darcy wrote: >> The changes in this PR on top of the out-for-review changes in >> https://git.openjdk.java.net/jdk/pull/7222 allow compile-time doclint >> checking to be enabled in all JDK modules. >> >> Typically, a @SuppressWarnings("doclint:refernce")

Re: Proposed JEP: Safer Process Launch by ProcessBuilder and Runtime.exec

2022-01-28 Thread Raffaello Giulietti
Hello, if I understand correctly, the issue addressed here (on Windows) is how to assemble a single command string from an array of argument strings to pass to CreateProcess() in a way that the individual argument strings can be fully recovered in the invoked program. Similarly when the