Re: RFR: JDK-8049516: sun.security.provider.SeedGenerator throws ArrayIndexOutOfBoundsException

2016-09-21 Thread Wang Weijun
> On Sep 22, 2016, at 8:34 AM, Xuelei Fan wrote: > > > latch = (latch + 1) & 0x7FFF; // Mask the sign bit > I'm fine with it. > > BTW, if you like, I may suggest to use a little bit small number for the > mask, for example 0x1FFF, so that the counter variable does not overflow > eith

Re: RFR: JDK-8049516: sun.security.provider.SeedGenerator throws ArrayIndexOutOfBoundsException

2016-09-21 Thread Xuelei Fan
> latch = (latch + 1) & 0x7FFF; // Mask the sign bit I'm fine with it. BTW, if you like, I may suggest to use a little bit small number for the mask, for example 0x1FFF, so that the counter variable does not overflow either. It works if counter overflow, but better not if we want the

Re: [9]RFR 8136355: CKM_SSL3_KEY_AND_MAC_DERIVE no longer available by default on Solaris 12

2016-09-21 Thread Xuelei Fan
Looks fine to me. Xuelei On 9/22/2016 7:40 AM, Valerie Peng wrote: Alright, I included the hex value of the version to the exception message. In addition, one of the regression test was using 0x400 as the version value and that has to be removed now that the version check has been corrected. ht

Re: [9]RFR 8136355: CKM_SSL3_KEY_AND_MAC_DERIVE no longer available by default on Solaris 12

2016-09-21 Thread Valerie Peng
Alright, I included the hex value of the version to the exception message. In addition, one of the regression test was using 0x400 as the version value and that has to be removed now that the version check has been corrected. http://cr.openjdk.java.net/~valeriep/8136355/webrev.02/ Thanks, Vale

Re: RFR: JDK-8049516: sun.security.provider.SeedGenerator throws ArrayIndexOutOfBoundsException

2016-09-21 Thread Jamil Nimeh
So here are a couple ideas related to your suggestion. We can leave a simple increment on latch and let it overflow, then in the array access do this: v ^= rndTab[(latch & 0x7FFF) % 255]; That clears the high order bit and the mod will keep it in the range of 0-254. the lvalue for the m

Re: [9]RFR 8136355: CKM_SSL3_KEY_AND_MAC_DERIVE no longer available by default on Solaris 12

2016-09-21 Thread Seán Coffey
Hey Valerie, There are a few calls in this code where an exception is thrown if a bad version is received. It's code that already existed, but would you mind enhancing the exceptions to print the version while editing the code there ? e.g. P11TlsKeyMaterialGenerator.java + throw n

Re: [9]RFR 8136355: CKM_SSL3_KEY_AND_MAC_DERIVE no longer available by default on Solaris 12

2016-09-21 Thread Valerie Peng
Good catch, I have fixed all three and updated the webrev: http://cr.openjdk.java.net/~valeriep/8136355/webrev.01 Thanks for the prompt review~ Valerie On 9/20/2016 8:11 PM, Xuelei Fan wrote: P11TlsKeyMaterialGenerator.java 102-106: There is a bug in the previous code. "&&" should be replaced w

Re: RFR: JDK-8049516: sun.security.provider.SeedGenerator throws ArrayIndexOutOfBoundsException

2016-09-21 Thread Jamil Nimeh
Unfortunately not just with a straight "latch & 0xff" because the rndTab array is 255 bytes, so every time latch is a multiple of 255 you end up out of bounds. It would work if we could add a 256th byte to the array. The comments suggest that there is an even statistical distribution of the v

Re: RFR: JDK-8049516: sun.security.provider.SeedGenerator throws ArrayIndexOutOfBoundsException

2016-09-21 Thread Wang Weijun
I am OK with your fix, but I found "(latch + 1) % Integer.MAX_VALUE" a little difficult to understand. Does rndTab[latch & 0xff] also work? Thanks Max > On Sep 21, 2016, at 11:57 PM, Jamil Nimeh wrote: > > Hi Max and Xuelei, > > Yesterday I also reached out to the SQE engineer who submitted

Re: RFR: JDK-8049516: sun.security.provider.SeedGenerator throws ArrayIndexOutOfBoundsException

2016-09-21 Thread Jamil Nimeh
Hi Max and Xuelei, Yesterday I also reached out to the SQE engineer who submitted the bug, asking if this is an issue he's seen going forward from the original instance in 8u20. He said that he hasn't seen this issue come up since the original bug submission. Since the simple overflow condit

Re: RFR(s): 8166450: SMARTCARDIO related tests failed on compilation

2016-09-21 Thread Sergei Kovalev
Hi Max, This is standard VM option. To emulate minimal JRE I'm using "--limit-modules java.base" option. 21.09.16 17:04, Wang Weijun wrote: Change looks fine. One question: When you say the --limit-modules option, is it a new option for jtreg that allows it to automatically choose modules

Re: RFR(s): 8166450: SMARTCARDIO related tests failed on compilation

2016-09-21 Thread Wang Weijun
Change looks fine. One question: When you say the --limit-modules option, is it a new option for jtreg that allows it to automatically choose modules described in the @modules tags? Or it's just the standard VM option and you still need to provide the module names yourself? Thanks Max > On Se

RFR(s): 8166450: SMARTCARDIO related tests failed on compilation

2016-09-21 Thread Sergei Kovalev
Hello team, Could you please review small fix for regression tests related to smartcardio API? BugID: https://bugs.openjdk.java.net/browse/JDK-8166450 WebRev: http://cr.openjdk.java.net/~skovalev/8166450/webrev.00/ Issue: unable to run smartcardio related tests bu jtreg by default. Root cause

RFR[9] JDK-8166439: Test sun/security/tools/jarsigner/nameclash.sh needs to output more details

2016-09-21 Thread John Jiang
Hi, I'm looking into JDK-8164827: sun/security/tools/jarsigner/nameclash.sh timeout But I cannot reproduce this issue, and the test didn't display any useful info. This patch takes this test to output more details. Webrev: http://cr.openjdk.java.net/~jjiang/8166439/webrev.00/ Issue: https://bu