Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8190753: (zipfs): Accessing a large entry (> 2^31 bytes) leads to a negative initial size for ByteArrayOutputStream #545

Closed
wants to merge 1 commit into from

Conversation

apavlyutkin
Copy link
Contributor

@apavlyutkin apavlyutkin commented Oct 20, 2021

I'd like to backport JDK-8190753 to jdk11u for parity with jdk13u.

The original patch applied with minor changes:

  • eliminated using of unsupported instanceof pattern match feature
  • calls of unsupported FileSystems.newFileSystem(Path) and FileSystems.newFileSystem(Path, Map<String,?>) interfaces are replaced with FileSystems.newFileSystem(URI,Map<String,?>)

Functionality was tested with accompanying

./test/jdk/jdk/nio/zipfs/LargeCompressedEntrySizeTest.java
./test/jdk/jdk/nio/zipfs/ZipFSOutputStreamTest.java

Regression: jdk_tier2


Progress

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

Issue

  • JDK-8190753: (zipfs): Accessing a large entry (> 2^31 bytes) leads to a negative initial size for ByteArrayOutputStream

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk11u-dev pull/545/head:pull/545
$ git checkout pull/545

Update a local copy of the PR:
$ git checkout pull/545
$ git pull https://git.openjdk.java.net/jdk11u-dev pull/545/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 545

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk11u-dev/pull/545.diff

@apavlyutkin
Copy link
Contributor Author

apavlyutkin commented Oct 20, 2021

/covered

@bridgekeeper bridgekeeper bot added the oca label Oct 20, 2021
@bridgekeeper
Copy link

bridgekeeper bot commented Oct 20, 2021

Hi @apavlyutkin, welcome to this OpenJDK project and thanks for contributing!

We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing /signed in a comment in this pull request.

If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user apavlyutkin" as summary for the issue.

If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing /covered in a comment in this pull request.

@bridgekeeper bridgekeeper bot added the oca-verify label Oct 20, 2021
@bridgekeeper
Copy link

bridgekeeper bot commented Oct 20, 2021

Thank you! Please allow for a few business days to verify that your employer has signed the OCA. Also, please note that pull requests that are pending an OCA check will not usually be evaluated, so your patience is appreciated!

@openjdk openjdk bot changed the title Backport c3d8e9228d0558a2ce3e093c105c61ea7af2e1d1 8190753: (zipfs): Accessing a large entry (> 2^31 bytes) leads to a negative initial size for ByteArrayOutputStream Oct 20, 2021
@openjdk
Copy link

openjdk bot commented Oct 20, 2021

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added the backport label Oct 20, 2021
@bridgekeeper bridgekeeper bot removed oca oca-verify labels Oct 22, 2021
@openjdk openjdk bot added the rfr label Oct 22, 2021
@mlbridge
Copy link

mlbridge bot commented Oct 22, 2021

Webrevs

Copy link
Contributor

@TheRealMDoerr TheRealMDoerr left a comment

LGTM. Thanks for backporting.

@openjdk
Copy link

openjdk bot commented Oct 26, 2021

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

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

8190753: (zipfs): Accessing a large entry (> 2^31 bytes) leads to a negative initial size for ByteArrayOutputStream

Reviewed-by: mdoerr

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 49 new commits pushed to the master branch:

  • 352672f: 8197811: Test java/awt/Choice/PopupPosTest/PopupPosTest.java fails on Windows
  • 243fd30: 8198623: java/awt/KeyboardFocusmanager/TypeAhead/EnqueueWithDialogButtonTest/EnqueueWithDialogButtonTest.java fails on mac
  • d8941d4: 8246807: Incorrect copyright header in TimeZoneDatePermissionCheck.sh
  • 7acc631: 8131745: java/lang/management/ThreadMXBean/AllThreadIds.java still fails intermittently
  • 3fb7528: 8274407: (tz) Update Timezone Data to 2021c
  • 7c3f2d5: Merge
  • 71f2c75: 8267086: ArrayIndexOutOfBoundsException in java.security.KeyFactory.generatePublic
  • dc2a8bc: 8222751: closed/test/jdk/sun/security/util/DerIndefLenConverter/IndefBerPkcs12.java fail
  • 9965662: 8157404: Unable to read certain PKCS12 keystores from SequenceInputStream
  • 80ba42a: 8268199: Correct certificate requests
  • ... and 39 more: https://git.openjdk.java.net/jdk11u-dev/compare/d5017c378c0624a6e2f1ec00fa5333b01f4c6fb2...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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@TheRealMDoerr) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready label Oct 26, 2021
@apavlyutkin
Copy link
Contributor Author

apavlyutkin commented Oct 27, 2021

/integrate

@openjdk openjdk bot added the sponsor label Oct 27, 2021
@openjdk
Copy link

openjdk bot commented Oct 27, 2021

@apavlyutkin
Your change (at version b2442ad) is now ready to be sponsored by a Committer.

@yan-too
Copy link

yan-too commented Oct 28, 2021

/sponsor

@openjdk
Copy link

openjdk bot commented Oct 28, 2021

Going to push as commit 8a9cda2.
Since your change was applied there have been 49 commits pushed to the master branch:

  • 352672f: 8197811: Test java/awt/Choice/PopupPosTest/PopupPosTest.java fails on Windows
  • 243fd30: 8198623: java/awt/KeyboardFocusmanager/TypeAhead/EnqueueWithDialogButtonTest/EnqueueWithDialogButtonTest.java fails on mac
  • d8941d4: 8246807: Incorrect copyright header in TimeZoneDatePermissionCheck.sh
  • 7acc631: 8131745: java/lang/management/ThreadMXBean/AllThreadIds.java still fails intermittently
  • 3fb7528: 8274407: (tz) Update Timezone Data to 2021c
  • 7c3f2d5: Merge
  • 71f2c75: 8267086: ArrayIndexOutOfBoundsException in java.security.KeyFactory.generatePublic
  • dc2a8bc: 8222751: closed/test/jdk/sun/security/util/DerIndefLenConverter/IndefBerPkcs12.java fail
  • 9965662: 8157404: Unable to read certain PKCS12 keystores from SequenceInputStream
  • 80ba42a: 8268199: Correct certificate requests
  • ... and 39 more: https://git.openjdk.java.net/jdk11u-dev/compare/d5017c378c0624a6e2f1ec00fa5333b01f4c6fb2...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Oct 28, 2021
@openjdk openjdk bot added integrated and removed ready rfr sponsor labels Oct 28, 2021
@openjdk
Copy link

openjdk bot commented Oct 28, 2021

@yan-too @apavlyutkin Pushed as commit 8a9cda2.

💡 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
backport integrated
3 participants