Skip to content

JDK-8273162 AbstractSplittableWithBrineGenerator does not create a random salt#5449

Closed
JimLaskey wants to merge 1 commit intoopenjdk:masterfrom
JimLaskey:8273162
Closed

JDK-8273162 AbstractSplittableWithBrineGenerator does not create a random salt#5449
JimLaskey wants to merge 1 commit intoopenjdk:masterfrom
JimLaskey:8273162

Conversation

@JimLaskey
Copy link
Member

@JimLaskey JimLaskey commented Sep 9, 2021

RandomSupport.AbstractSplittableWithBrineGenerator. makeSplitsSpliterator is intending to create a salt from a random long. The salt should have random letters of size 4 for each consecutive 4 bits and then the last 4 bits as ff, i.e. all bits set.

However the loop is never executed, the random bits are not used and the salt is always the same.

This condition is false on the first execution:

long multiplier = (1L << SALT_SHIFT) - 1;
long salt = multiplier << (64 - SALT_SHIFT);
while ((salt & multiplier) != 0) {

This can be corrected by changing:

while ((salt & multiplier) != 0) {

to

while ((salt & multiplier) == 0) {


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8273162: AbstractSplittableWithBrineGenerator does not create a random salt

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5449/head:pull/5449
$ git checkout pull/5449

Update a local copy of the PR:
$ git checkout pull/5449
$ git pull https://git.openjdk.java.net/jdk pull/5449/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5449

View PR using the GUI difftool:
$ git pr show -t 5449

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5449.diff

@JimLaskey
Copy link
Member Author

/csr

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 9, 2021

👋 Welcome back jlaskey! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 9, 2021
@openjdk
Copy link

openjdk bot commented Sep 9, 2021

@JimLaskey the issue for this pull request, JDK-8273162, already has an approved CSR request: JDK-8273183

@openjdk
Copy link

openjdk bot commented Sep 9, 2021

@JimLaskey The following label will be automatically applied to this pull request:

  • core-libs

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the core-libs core-libs-dev@openjdk.org label Sep 9, 2021
@mlbridge
Copy link

mlbridge bot commented Sep 9, 2021

Webrevs

@openjdk
Copy link

openjdk bot commented Sep 10, 2021

@JimLaskey This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8273162: AbstractSplittableWithBrineGenerator does not create a random salt

Reviewed-by: rriggs, bpb

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 134 new commits pushed to the master branch:

  • ec9d1be: 8273194: Document the two possible cases when Lookup::ensureInitialized returns
  • 81d2ace: 8273369: Computing micros between two instants unexpectedly overflows for some cases
  • efe3ed1: 8273358: macOS Monterey does not have the font Times needed by Serif
  • e58c12e: 8273512: Fix the copyright header of x86 macroAssembler files
  • 461a467: 8273456: Do not hold ttyLock around stack walking
  • 695b434: Merge
  • 4afbcaf: 8273592: Backout JDK-8271868
  • a37254c: 8271868: Warn user when using mac-sign option with unsigned app-image.
  • c464f09: 8273402: Use derived NamingExceptions in com.sun.jndi.ldap.Connection#readReply
  • 4e6de5f: 8273541: Cleaner Thread creates with normal priority instead of MAX_PRIORITY - 2
  • ... and 124 more: https://git.openjdk.java.net/jdk/compare/9bc7cc56513adb9d2e39cd286d2a229c9c285e2d...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 10, 2021
@JimLaskey
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Sep 10, 2021

Going to push as commit 5e1df2c.
Since your change was applied there have been 135 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Sep 10, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Sep 10, 2021
@openjdk
Copy link

openjdk bot commented Sep 10, 2021

@JimLaskey Pushed as commit 5e1df2c.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants