Withdrawn: 8306688: Support Windows serialized keystores (SST files)

2023-07-27 Thread duke
On Fri, 26 May 2023 21:09:35 GMT, Mat Carter wrote: > Added ability to load keystores from SST files on Windows. Example usage: > > KeyStore keyStore = KeyStore.getInstance("Windows-SST"); > try (FileInputStream fis = new FileInputStream("mykeystore.sst")) { >keyStore.load(fis, null); > } >

Integrated: 8302017: Allocate BadPaddingException only if it will be thrown

2023-07-27 Thread Valerie Peng
On Tue, 11 Jul 2023 23:19:40 GMT, Valerie Peng wrote: > This change refactors the RSAPadding class to return an output record > containing the status instead of relying on exception object to indicate a > failure. > > Thanks in advance for review~ > Valerie This pull request has now been inte

Re: RFR: 8302017: Allocate BadPaddingException only if it will be thrown [v4]

2023-07-27 Thread Valerie Peng
On Thu, 27 Jul 2023 20:42:37 GMT, Valerie Peng wrote: >> This change refactors the RSAPadding class to return an output record >> containing the status instead of relying on exception object to indicate a >> failure. >> >> Thanks in advance for review~ >> Valerie > > Valerie Peng has updated t

Re: RFR: 8302017: Allocate BadPaddingException only if it will be thrown [v3]

2023-07-27 Thread Xue-Lei Andrew Fan
On Thu, 27 Jul 2023 20:35:42 GMT, Valerie Peng wrote: >> I checked back the specification back to RFC 2437, released on October 1998, >> which requires to encode NULL parameters as well. As the update to keep the >> consistency is not trivial, I may just remove it and see if it could be a >>

Re: RFR: 8302017: Allocate BadPaddingException only if it will be thrown [v4]

2023-07-27 Thread Xue-Lei Andrew Fan
On Thu, 27 Jul 2023 20:42:37 GMT, Valerie Peng wrote: >> This change refactors the RSAPadding class to return an output record >> containing the status instead of relying on exception object to indicate a >> failure. >> >> Thanks in advance for review~ >> Valerie > > Valerie Peng has updated t

Re: RFR: 8302017: Allocate BadPaddingException only if it will be thrown [v4]

2023-07-27 Thread Valerie Peng
> This change refactors the RSAPadding class to return an output record > containing the status instead of relying on exception object to indicate a > failure. > > Thanks in advance for review~ > Valerie Valerie Peng has updated the pull request incrementally with one additional commit since t

Re: RFR: 8302017: Allocate BadPaddingException only if it will be thrown [v3]

2023-07-27 Thread Valerie Peng
On Tue, 25 Jul 2023 05:29:41 GMT, Xue-Lei Andrew Fan wrote: >> Max is on vacation and may not see your question for a while... >> IIRC, the inconsistency (NULL vs omission) goes way back. As time goes on, >> this may no longer be an issue as spec is clarified and vendors update their >> impleme

Re: RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available [v2]

2023-07-27 Thread Sergey Tsypanov
On Thu, 27 Jul 2023 16:59:58 GMT, Brian Burkhalter wrote: >> Then I guess we don't need this `if`-clause > > Then I think one gets an error if `0 < len < BUF_SIZE`: > > > $ cat free.c > #include > > int main(int argc, char** argv) > { > char stackBuf[8]; > char* buf; > > buf = st

Re: RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available [v2]

2023-07-27 Thread Brian Burkhalter
On Thu, 27 Jul 2023 16:35:05 GMT, Sergey Tsypanov wrote: >> I don't see how this is possible. The value of `buf` is either `stackBuf` or >> a value returned by `malloc()`. In any case, this code will be superseded. > > Then I guess we don't need this `if`-clause Then I think one gets an error i

Re: RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available [v2]

2023-07-27 Thread Sergey Tsypanov
On Thu, 27 Jul 2023 15:54:30 GMT, Brian Burkhalter wrote: >> src/java.base/share/native/libjava/io_util.c line 199: >> >>> 197: } >>> 198: >>> 199: if (buf != stackBuf) >> >> Wouldn't this cause a leak when if-condition is not met and `free(buf)` is >> not called? > > I don't see how

Re: RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available [v2]

2023-07-27 Thread Brian Burkhalter
On Thu, 27 Jul 2023 13:42:43 GMT, Sergey Tsypanov wrote: >> Brian Burkhalter has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - 6478546: Decrease malloc limit to 1.5 MB >> - 6478546: Minor refactoring >> - 6478546: Prevent short read

Re: RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available [v2]

2023-07-27 Thread Sergey Tsypanov
On Tue, 25 Jul 2023 23:50:07 GMT, Brian Burkhalter wrote: >> Limit native memory allocation and move write loop from the native layer >> into Java. This change should make the OOME reported in the issue much less >> likely. > > Brian Burkhalter has updated the pull request incrementally with th