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

8312489: Increase jdk.jar.maxSignatureFileSize default which is too low for JARs such as WhiteSource/Mend unified agent jar #15072

Closed
wants to merge 3 commits into from

Conversation

haimaychao
Copy link
Contributor

@haimaychao haimaychao commented Jul 28, 2023

JDK-8312489: Increase jdk.jar.maxSignatureFileSize default which is too low for JARs such as WhiteSource/Mend unified agent jar


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change requires CSR request JDK-8313216 to be approved
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issues

  • JDK-8312489: Increase jdk.jar.maxSignatureFileSize default which is too low for JARs such as WhiteSource/Mend unified agent jar (Enhancement - P3)
  • JDK-8313216: Increase jdk.jar.maxSignatureFileSize default which is too low for JARs such as WhiteSource/Mend unified agent jar (CSR)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/15072/head:pull/15072
$ git checkout pull/15072

Update a local copy of the PR:
$ git checkout pull/15072
$ git pull https://git.openjdk.org/jdk.git pull/15072/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 15072

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/15072.diff

Webrev

Link to Webrev Comment

…ow for JARs such as WhiteSource/Mend unified agent jar
@bridgekeeper
Copy link

bridgekeeper bot commented Jul 28, 2023

👋 Welcome back hchao! 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 Jul 28, 2023
@openjdk
Copy link

openjdk bot commented Jul 28, 2023

@haimaychao The following labels will be automatically applied to this pull request:

  • core-libs
  • security

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

@openjdk openjdk bot added security security-dev@openjdk.org core-libs core-libs-dev@openjdk.org labels Jul 28, 2023
@haimaychao
Copy link
Contributor Author

/label remove core-libs

@openjdk openjdk bot removed the core-libs core-libs-dev@openjdk.org label Jul 28, 2023
@openjdk
Copy link

openjdk bot commented Jul 28, 2023

@haimaychao
The core-libs label was successfully removed.

@mlbridge
Copy link

mlbridge bot commented Jul 28, 2023

Webrevs

@@ -848,15 +848,15 @@ private static int initializeMaxSigFileSize() {
* in a JAR file.
*/
Integer tmp = GetIntegerAction.privilegedGetProperty(
"jdk.jar.maxSignatureFileSize", 8000000);
"jdk.jar.maxSignatureFileSize", 16000000);
if (tmp < 0 || tmp > MAX_ARRAY_SIZE) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't tmp be null? After all, it is an Integer object. The rest of your code changes look fine to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tmp will not be null. GetIntegerAction.privilegedGetProperty() will return the default value when jdk.jar.maxSignatureFileSize=null

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. Didn't look close enough.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might make sense to declare tmp as an int to avoid future confusion and save a few bytecode on repeated implicit unboxing every time tmp is used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done as suggested.

Comment on lines 854 to 857
debug.println("Default signature file size 16000000 bytes " +
"is used as the specified size for the " +
"jdk.jar.maxSignatureFileSize system property " +
"is out of range: " + tmp);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The wording of the message is a bit hard to understand. I suggest rewording slightly as:

                debug.println("The default signature file size of 16000000 bytes " +
                        "will be used as the specified size for the " +
                        "jdk.jar.maxSignatureFileSize system property " +
                        "since the value is out of range: " + tmp);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reworded the debug message.

Copy link
Member

@MBaesken MBaesken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the adjustment. Looks good to me.

@openjdk
Copy link

openjdk bot commented Jul 31, 2023

@haimaychao 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:

8312489: Increase jdk.jar.maxSignatureFileSize default which is too low for JARs such as WhiteSource/Mend unified agent jar

Reviewed-by: mullan, mbaesken

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

  • b60e0ad: 8313207: Remove MetaspaceShared::_has_error_classes
  • 408987e: 8313307: java/util/Formatter/Padding.java fails on some Locales
  • 6fca289: 8313023: Return value corrupted when using CCS + isTrivial (mainline)
  • f8c2b7f: 8313231: Redundant if statement in ZoneInfoFile
  • 807ca2d: 8313316: Disable runtime/ErrorHandling/MachCodeFramesInErrorFile.java on ppc64le
  • ad34be1: 8312525: New test runtime/os/TestTrimNative.java#trimNative is failing: did not see the expected RSS reduction
  • d6245b6: 8310268: RISC-V: misaligned memory access in String.Compare intrinsic
  • 402cb6a: 8312201: Clean up common behavior in "page writers" and "member writers"
  • 23755f9: 8312411: MessageFormat.formatToCharacterIterator() can be improved
  • e2cb0bc: 8313204: Inconsistent order of sections in generated class documentation
  • ... and 49 more: https://git.openjdk.org/jdk/compare/d63bff672feafc7df4b1324bf7acce105a998913...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 Jul 31, 2023
@FrankReisenhofer
Copy link

FrankReisenhofer commented Jul 31, 2023

Hi @FrankReisenhofer, thanks for making a comment in an OpenJDK project!

All comments and discussions in the OpenJDK Community must be made available under the OpenJDK Terms of Use. 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 FrankReisenhofer for the summary.

If you are not an OpenJDK Author, Committer or Reviewer, simply check the box below to accept the OpenJDK Terms of Use for your comments.

Your comment will be automatically restored once you have accepted the OpenJDK Terms of Use.

@haimaychao
Copy link
Contributor Author

Thanks for the review.

@haimaychao
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Jul 31, 2023

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

  • 78f6799: 8293972: runtime/NMT/NMTInitializationTest.java#default_long-off failed with "Suspiciously long bucket chains in lookup table."
  • 97b6883: 8295059: test/langtools/tools/javap 12 test classes use com.sun.tools.classfile library
  • 3671d83: 8313252: Java_sun_awt_windows_ThemeReader_paintBackground release resources in early returns
  • b60e0ad: 8313207: Remove MetaspaceShared::_has_error_classes
  • 408987e: 8313307: java/util/Formatter/Padding.java fails on some Locales
  • 6fca289: 8313023: Return value corrupted when using CCS + isTrivial (mainline)
  • f8c2b7f: 8313231: Redundant if statement in ZoneInfoFile
  • 807ca2d: 8313316: Disable runtime/ErrorHandling/MachCodeFramesInErrorFile.java on ppc64le
  • ad34be1: 8312525: New test runtime/os/TestTrimNative.java#trimNative is failing: did not see the expected RSS reduction
  • d6245b6: 8310268: RISC-V: misaligned memory access in String.Compare intrinsic
  • ... and 52 more: https://git.openjdk.org/jdk/compare/d63bff672feafc7df4b1324bf7acce105a998913...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jul 31, 2023
@openjdk openjdk bot closed this Jul 31, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jul 31, 2023
@openjdk
Copy link

openjdk bot commented Jul 31, 2023

@haimaychao Pushed as commit e47a84f.

💡 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
integrated Pull request has been integrated security security-dev@openjdk.org
6 participants