Re: RFR: 8289275: Remove incorrect __declspec(dllimport) attributes from pointers in jdk.crypto.cryptoki

2022-07-08 Thread Julian Waters
On Thu, 7 Jul 2022 21:57:42 GMT, Valerie Peng wrote: > pkcs11.h is a standard header file from OASIS. Best to leave it alone. Just > my .02. The only change to pkcs11.h is in a comment though, the other changes are outside the ANSI C headers from the standard. Should I just revert the comment

Re: RFR: 8275662: remove test/lib/sun/hotspot

2022-07-08 Thread Leonid Mesnik
On Fri, 8 Jul 2022 19:46:17 GMT, Coleen Phillimore wrote: > This change removes the last remnants of sun/hotspot/WhiteBox.java and other > classes, and uses the versions in jdk/test/whitebox. > I used sed to change sun.hotspot.{gc,code,cpuinfo} to jdk.test.whitebox and > deleted the old files a

Re: RFR: 8275662: remove test/lib/sun/hotspot

2022-07-08 Thread Serguei Spitsyn
On Fri, 8 Jul 2022 19:46:17 GMT, Coleen Phillimore wrote: > This change removes the last remnants of sun/hotspot/WhiteBox.java and other > classes, and uses the versions in jdk/test/whitebox. > I used sed to change sun.hotspot.{gc,code,cpuinfo} to jdk.test.whitebox and > deleted the old files a

Re: RFR: 8275662: remove test/lib/sun/hotspot

2022-07-08 Thread Coleen Phillimore
On Fri, 8 Jul 2022 19:46:17 GMT, Coleen Phillimore wrote: > This change removes the last remnants of sun/hotspot/WhiteBox.java and other > classes, and uses the versions in jdk/test/whitebox. > I used sed to change sun.hotspot.{gc,code,cpuinfo} to jdk.test.whitebox and > deleted the old files a

Re: RFR: 8275662: remove test/lib/sun/hotspot

2022-07-08 Thread Mikhailo Seledtsov
On Fri, 8 Jul 2022 19:46:17 GMT, Coleen Phillimore wrote: > This change removes the last remnants of sun/hotspot/WhiteBox.java and other > classes, and uses the versions in jdk/test/whitebox. > I used sed to change sun.hotspot.{gc,code,cpuinfo} to jdk.test.whitebox and > deleted the old files a

RFR: 8275662: remove test/lib/sun/hotspot

2022-07-08 Thread Coleen Phillimore
This change removes the last remnants of sun/hotspot/WhiteBox.java and other classes, and uses the versions in jdk/test/whitebox. I used sed to change sun.hotspot.{gc,code,cpuinfo} to jdk.test.whitebox and deleted the old files and some references to sun.hotspot. Tested with tier1-4. ---

Re: RFR: 8282038: CipherSpi.bufferCrypt leaves plaintext copy on the heap

2022-07-08 Thread Weijun Wang
On Tue, 21 Jun 2022 22:06:23 GMT, Weijun Wang wrote: >> Sounds good. Rest of changes look fine. > > I cannot reproduce this leak, but I found more by mixing the calls on byte > array and `ByteBuffer`, and data length of whole block and half block. I'll > study more and maybe some sort of fuzzy

Integrated: 6522064: Aliases from Microsoft CryptoAPI has bad character encoding

2022-07-08 Thread Weijun Wang
On Wed, 8 Jun 2022 13:42:43 GMT, Weijun Wang wrote: > Switch to wide char version of `CertGetNameString` to get the non-ASCII name. This pull request has now been integrated. Changeset: 1877533f Author:Weijun Wang URL: https://git.openjdk.org/jdk/commit/1877533f757731e2ce918230bfb34

Re: RFR: 8289768: Clean up unused code [v3]

2022-07-08 Thread Alan Bateman
On Fri, 8 Jul 2022 07:08:46 GMT, Daniel Jeliński wrote: >> This patch removes many unused variables and one unused label reported by >> the compilers when relevant warnings are enabled. >> >> The unused code was found by compiling after removing `unused` from the list >> of disabled warnings

Integrated: 8271707: migrate tests to use jdk.test.whitebox.WhiteBox

2022-07-08 Thread Coleen Phillimore
On Thu, 7 Jul 2022 20:43:09 GMT, Coleen Phillimore wrote: > This change uses sed to change sun.hotspot.WhiteBox to > jdk.test.whitebox.Whitebox, and sun/hotspot/Whitebox similarly. Due to > indirect inclusions of some of the test libraries, changing a few wasn't a > reliable option, and I nee

Re: RFR: 8271707: migrate tests to use jdk.test.whitebox.WhiteBox

2022-07-08 Thread Coleen Phillimore
On Thu, 7 Jul 2022 20:43:09 GMT, Coleen Phillimore wrote: > This change uses sed to change sun.hotspot.WhiteBox to > jdk.test.whitebox.Whitebox, and sun/hotspot/Whitebox similarly. Due to > indirect inclusions of some of the test libraries, changing a few wasn't a > reliable option, and I nee

Re: RFR: 8289908: Skip bounds check for cases when String is constructed from entirely used byte[]

2022-07-08 Thread Roger Riggs
On Fri, 8 Jul 2022 07:37:36 GMT, Сергей Цыпанов wrote: >> src/java.base/share/classes/java/lang/String.java line 1429: >> >>> 1427: */ >>> 1428: public String(byte[] bytes, int offset, int length) { >>> 1429: this(bytes, offset, length, Charset.defaultCharset(), >>> checkBounds

Re: RFR: 8289768: Clean up unused code [v3]

2022-07-08 Thread Chris Plummer
On Fri, 8 Jul 2022 07:08:46 GMT, Daniel Jeliński wrote: >> This patch removes many unused variables and one unused label reported by >> the compilers when relevant warnings are enabled. >> >> The unused code was found by compiling after removing `unused` from the list >> of disabled warnings

Re: RFR: 8289768: Clean up unused code [v3]

2022-07-08 Thread Daniel Jeliński
On Fri, 8 Jul 2022 07:08:46 GMT, Daniel Jeliński wrote: >> This patch removes many unused variables and one unused label reported by >> the compilers when relevant warnings are enabled. >> >> The unused code was found by compiling after removing `unused` from the list >> of disabled warnings

Re: RFR: 8271707: migrate tests to use jdk.test.whitebox.WhiteBox

2022-07-08 Thread David Holmes
On Thu, 7 Jul 2022 20:43:09 GMT, Coleen Phillimore wrote: > This change uses sed to change sun.hotspot.WhiteBox to > jdk.test.whitebox.Whitebox, and sun/hotspot/Whitebox similarly. Due to > indirect inclusions of some of the test libraries, changing a few wasn't a > reliable option, and I nee

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v17]

2022-07-08 Thread XenoAmess
On Wed, 1 Jun 2022 16:45:35 GMT, liach wrote: >> XenoAmess has updated the pull request incrementally with one additional >> commit since the last revision: >> >> do it as naotoj said > > 'the new' fix should be applied to newHashMap etc. too. > @liach > > > 'the new' fix should be applied

Re: [jdk19] RFR: 8287809: Revisit implementation of memory session [v6]

2022-07-08 Thread Jorn Vernee
On Wed, 6 Jul 2022 21:50:36 GMT, Maurizio Cimadamore wrote: >> This is a JDK 19 clone of: https://github.com/openjdk/jdk/pull/9017 > > Maurizio Cimadamore has updated the pull request incrementally with one > additional commit since the last revision: > > Turn non-closeable view back into Me

Re: RFR: 8283082: sun.security.x509.X509CertImpl.delete("x509.info.validity") nulls out info field [v5]

2022-07-08 Thread Jayashree Huttanagoudar
On Fri, 8 Jul 2022 13:01:16 GMT, Weijun Wang wrote: > Great, this looks good. Please use 2022 in the copyright year of the test. > You might also want to use your own company's name since this is a new test. > See > https://github.com/openjdk/jdk/blob/1ee80e03adfae5f428519f7c134e78a0f277a0a5/t

Withdrawn: 8289939: Add flag to restrict public exponent as described in SP 800-56B

2022-07-08 Thread Kevin Driver
On Thu, 7 Jul 2022 19:04:41 GMT, Kevin Driver wrote: > [SP > 800-56B](https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-56Br2.pdf) > stipulates that the publicExponent e "shall" be 65,537 ≤ e < 2^256 This pull request has been closed without being integrated. - PR

Re: RFR: 8215916: The failure reason of an optional JAAS LoginModule is not logged

2022-07-08 Thread Weijun Wang
On Tue, 14 Jun 2022 19:07:24 GMT, Jayashree Huttanagoudar wrote: > Could you please review the changes? > This patch is to address : > https://bugs.openjdk.org/browse/JDK-8215916?jql=labels%20%3D%20starter-bug `SmartLoginModule.java` is a class used by a test, itself is not one since there's

Re: RFR: 8215916: The failure reason of an optional JAAS LoginModule is not logged

2022-07-08 Thread Jayashree Huttanagoudar
On Fri, 8 Jul 2022 13:12:23 GMT, Weijun Wang wrote: > `SmartLoginModule.java` is a class used by a test, itself is not one since > there's no `main()` method. > You are right. > Your new test needs to be a regression test, which means before the fix it > fails and after the fix it succeeds. Al

Re: RFR: 8215916: The failure reason of an optional JAAS LoginModule is not logged

2022-07-08 Thread Jayashree Huttanagoudar
On Tue, 14 Jun 2022 19:07:24 GMT, Jayashree Huttanagoudar wrote: > Could you please review the changes? > This patch is to address : > https://bugs.openjdk.org/browse/JDK-8215916?jql=labels%20%3D%20starter-bug Looks like already the test cases which serve our purpose to test our patch are alr

Re: RFR: 8271707: migrate tests to use jdk.test.whitebox.WhiteBox

2022-07-08 Thread Coleen Phillimore
On Fri, 8 Jul 2022 06:12:18 GMT, David Holmes wrote: >> This change uses sed to change sun.hotspot.WhiteBox to >> jdk.test.whitebox.Whitebox, and sun/hotspot/Whitebox similarly. Due to >> indirect inclusions of some of the test libraries, changing a few wasn't a >> reliable option, and I need

Re: RFR: 8283082: sun.security.x509.X509CertImpl.delete("x509.info.validity") nulls out info field [v5]

2022-07-08 Thread Weijun Wang
On Fri, 8 Jul 2022 09:13:51 GMT, Jayashree Huttanagoudar wrote: >> Could you please review the changes? >> This is to address the issue: >> https://bugs.openjdk.org/browse/JDK-8283082?jql=labels%20%3D%20starter-bug > > Jayashree Huttanagoudar has updated the pull request incrementally with one

Re: RFR: 8283082: sun.security.x509.X509CertImpl.delete("x509.info.validity") nulls out info field [v4]

2022-07-08 Thread Jayashree Huttanagoudar
On Fri, 8 Jul 2022 09:00:56 GMT, Jayashree Huttanagoudar wrote: >> Could you please review the changes? >> This is to address the issue: >> https://bugs.openjdk.org/browse/JDK-8283082?jql=labels%20%3D%20starter-bug > > Jayashree Huttanagoudar has updated the pull request incrementally with one

Re: RFR: 8289275: Remove incorrect __declspec(dllimport) attributes from pointers in jdk.crypto.cryptoki

2022-07-08 Thread Valerie Peng
On Sat, 2 Jul 2022 02:12:15 GMT, Julian Waters wrote: > Several instances of function pointers in jdk.crypto.cryptoki are marked with > the dllimport attribute, which should only be applied to symbol declarations, > of which a typedef'd function pointer is not. This would only be useful if a >

Re: RFR: 8283082: sun.security.x509.X509CertImpl.delete("x509.info.validity") nulls out info field [v4]

2022-07-08 Thread Jayashree Huttanagoudar
> Could you please review the changes? > This is to address the issue: > https://bugs.openjdk.org/browse/JDK-8283082?jql=labels%20%3D%20starter-bug Jayashree Huttanagoudar has updated the pull request incrementally with one additional commit since the last revision: Address review comment to

Re: RFR: 8283082: sun.security.x509.X509CertImpl.delete("x509.info.validity") nulls out info field [v5]

2022-07-08 Thread Jayashree Huttanagoudar
> Could you please review the changes? > This is to address the issue: > https://bugs.openjdk.org/browse/JDK-8283082?jql=labels%20%3D%20starter-bug Jayashree Huttanagoudar has updated the pull request incrementally with one additional commit since the last revision: Address trailing whitespac

Re: RFR: 8289768: Clean up unused code [v3]

2022-07-08 Thread Daniel Jeliński
> This patch removes many unused variables and one unused label reported by the > compilers when relevant warnings are enabled. > > The unused code was found by compiling after removing `unused` from the list > of disabled warnings for > [gcc](https://github.com/openjdk/jdk/blob/master/make/au

Re: RFR: 8289768: Clean up unused code [v2]

2022-07-08 Thread Daniel Jeliński
On Thu, 7 Jul 2022 19:06:52 GMT, Chris Plummer wrote: >> Daniel Jeliński 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 four additional >> comm

Re: RFR: 8289908: Skip bounds check for cases when String is constructed from entirely used byte[]

2022-07-08 Thread Сергей Цыпанов
On Thu, 7 Jul 2022 18:45:03 GMT, Roger Riggs wrote: >> We can skip bounds check and null check for Charset in case we use the array >> entirely and the Charset is either default one or proven to be non-null. >> >> Benchmark results: >> >> before >> >> Benchmark

Re: RFR: 8271707: migrate tests to use jdk.test.whitebox.WhiteBox

2022-07-08 Thread Leonid Mesnik
On Thu, 7 Jul 2022 20:43:09 GMT, Coleen Phillimore wrote: > This change uses sed to change sun.hotspot.WhiteBox to > jdk.test.whitebox.Whitebox, and sun/hotspot/Whitebox similarly. Due to > indirect inclusions of some of the test libraries, changing a few wasn't a > reliable option, and I nee

RFR: 8271707: migrate tests to use jdk.test.whitebox.WhiteBox

2022-07-08 Thread Coleen Phillimore
This change uses sed to change sun.hotspot.WhiteBox to jdk.test.whitebox.Whitebox, and sun/hotspot/Whitebox similarly. Due to indirect inclusions of some of the test libraries, changing a few wasn't a reliable option, and I need the new one for a different change I was looking at. The non-sed c

RFR: 8282730: LdapLoginModule throw NPE from logout method after login failure

2022-07-08 Thread Weijun Wang
Add null-checks in all `LoginModule` implementations. It's possible that an application calls `logout` after a login failure, where most internal variables for principals and credentials are null and removing a null from the `Subject`'s principals and credentials sets will trigger a `NullPointe

Re: RFR: 8282730: LdapLoginModule throw NPE from logout method after login failure

2022-07-08 Thread Weijun Wang
On Fri, 1 Jul 2022 17:31:06 GMT, Weijun Wang wrote: > Add null-checks in all `LoginModule` implementations. It's possible that an > application calls `logout` after a login failure, where most internal > variables for principals and credentials are null and removing a null from > the `Subject`

Integrated: JDK-8284851 Update javax.crypto files to use proper javadoc for mentioned classes

2022-07-08 Thread Mark Powers
On Fri, 24 Jun 2022 16:48:46 GMT, Mark Powers wrote: > https://bugs.openjdk.org/browse/JDK-8284851 This pull request has now been integrated. Changeset: f804f2ce Author:Mark Powers Committer: Valerie Peng URL: https://git.openjdk.org/jdk/commit/f804f2ce8ef7a859aae021b20cbdcd9e34f9f

Re: RFR: 8215916: The failure reason of an optional JAAS LoginModule is not logged

2022-07-08 Thread Weijun Wang
On Tue, 14 Jun 2022 19:07:24 GMT, Jayashree Huttanagoudar wrote: > Could you please review the changes? > This patch is to address : > https://bugs.openjdk.org/browse/JDK-8215916?jql=labels%20%3D%20starter-bug Yes, or you can write an individual test. - PR: https://git.openjdk.or

Re: RFR: JDK-8284851 Update javax.crypto files to use proper javadoc for mentioned classes [v7]

2022-07-08 Thread Mark Powers
On Thu, 7 Jul 2022 17:35:08 GMT, Valerie Peng wrote: >> Mark Powers 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 sin

Re: RFR: JDK-8284851 Update javax.crypto files to use proper javadoc for mentioned classes [v7]

2022-07-08 Thread Valerie Peng
On Thu, 7 Jul 2022 02:45:42 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8284851 > > Mark Powers 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 r

Integrated: 8289301: P11Cipher should not throw out of bounds exception during padding

2022-07-08 Thread zzambers
On Tue, 28 Jun 2022 12:57:21 GMT, zzambers wrote: > SunPkcs11 provider throws out of bounds exception during encryption when > specific conditions are met. > > Exception: > > Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Array > index out of range: 32 > at java.ba

Re: RFR: JDK-8284851 Update javax.crypto files to use proper javadoc for mentioned classes [v2]

2022-07-08 Thread Valerie Peng
On Thu, 30 Jun 2022 16:19:17 GMT, Mark Powers wrote: >> src/java.base/share/classes/javax/crypto/SealedObject.java line 195: >> >>> 193: /** >>> 194: * Constructs a SealedObject object from the passed-in >>> 195: * SealedObject. >> >> Add `{@code }` to SealedObject? > > using `{@c

Re: RFR: 6522064: Aliases from Microsoft CryptoAPI has bad character encoding

2022-07-08 Thread Hai-May Chao
On Wed, 8 Jun 2022 13:42:43 GMT, Weijun Wang wrote: > Switch to wide char version of `CertGetNameString` to get the non-ASCII name. Marked as reviewed by hchao (Committer). Test case looks good. - PR: https://git.openjdk.org/jdk/pull/9085

Re: RFR: JDK-8284851 Update javax.crypto files to use proper javadoc for mentioned classes [v8]

2022-07-08 Thread Valerie Peng
On Thu, 7 Jul 2022 18:48:59 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8284851 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > final comments from Valerie Ok with the changes under javax.crypto package.

Re: RFR: 8283082: sun.security.x509.X509CertImpl.delete("x509.info.validity") nulls out info field [v3]

2022-07-08 Thread Jayashree Huttanagoudar
On Thu, 7 Jul 2022 13:58:53 GMT, Weijun Wang wrote: > You can expand the "Run Tests" task and see the failed one (it's very long). > It's a linux-x86 test and it mentions "thread". I've heard that > thread-related tests could fail on linux-x86 because loom support was only > added to linux-x64

Re: RFR: 8283082: sun.security.x509.X509CertImpl.delete("x509.info.validity") nulls out info field [v3]

2022-07-08 Thread Weijun Wang
On Wed, 29 Jun 2022 16:08:01 GMT, Jayashree Huttanagoudar wrote: >> Could you please review the changes? >> This is to address the issue: >> https://bugs.openjdk.org/browse/JDK-8283082?jql=labels%20%3D%20starter-bug > > Jayashree Huttanagoudar has updated the pull request incrementally with one

Re: RFR: 8289939: Add flag to restrict public exponent as described in SP 800-56B [v2]

2022-07-08 Thread Kevin Driver
> [SP > 800-56B](https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-56Br2.pdf) > stipulates that the publicExponent e "shall" be 65,537 ≤ e < 2^256 Kevin Driver has updated the pull request incrementally with one additional commit since the last revision: update copyright ---

Re: RFR: JDK-8284851 Update javax.crypto files to use proper javadoc for mentioned classes [v7]

2022-07-08 Thread Valerie Peng
On Thu, 7 Jul 2022 02:45:42 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8284851 > > Mark Powers 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 r