Skip to content

Conversation

@justin-curtis-lu
Copy link
Member

@justin-curtis-lu justin-curtis-lu commented Oct 17, 2024

Please review this PR which improves the readObject logic for j.text.MessageFormat.

No offset should be larger than the pattern length. We already ensure the offsets when consumed backwards are equal/descending. The existing first/initial check was off by 1 since it was checking against the pattern length + 1; (see L2040 and L2043).

Please see the JBS issue for further info and other test details.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8340554: Improve MessageFormat readObject checks (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 21570

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 17, 2024

👋 Welcome back jlu! 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
Copy link

openjdk bot commented Oct 17, 2024

@justin-curtis-lu 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:

8340554: Improve MessageFormat readObject checks

Reviewed-by: naoto

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

  • 98403b7: 8342854: [JVMCI] Block secondary thread reporting a JVMCI fatal error
  • 9a7a850: 8341939: SigningOptionsTest fails without Xcode with command line developer tools after JDK-8341443
  • de92fe3: 8233451: (fs) Files.newInputStream() cannot be used with character special files
  • 002de86: 8342673: Test serviceability/jvmti/events/NotifyFramePopStressTest/NotifyFramePopStressTest.java failed: waited too long for notify
  • a21c558: 8342863: Use pattern matching for instanceof in equals methods of wrapper classes
  • e64f079: 8342582: user.region for formatting number no longer works for 21.0.5
  • 426da4b: 8341975: Unable to set encoding for IO.println, IO.print and IO.readln
  • a522d21: 8342858: Make target mac-jdk-bundle fails on chmod command
  • afb62f7: 8342683: Use non-short forward jump when passing stop()
  • 964d8d2: 8340445: [PPC64] Wrong ConditionRegister used in ppc64.ad: flagsRegCR0 cr1
  • ... and 75 more: https://git.openjdk.org/jdk/compare/236c71cad9fa269518456c11edcfb353bbfc084d...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 rfr Pull request is ready for review label Oct 17, 2024
@openjdk
Copy link

openjdk bot commented Oct 17, 2024

@justin-curtis-lu The following labels will be automatically applied to this pull request:

  • core-libs
  • i18n

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 core-libs core-libs-dev@openjdk.org i18n i18n-dev@openjdk.org labels Oct 17, 2024
@mlbridge
Copy link

mlbridge bot commented Oct 17, 2024

Webrevs

Copy link
Member

@naotoj naotoj left a comment

Choose a reason for hiding this comment

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

LGTM

// Offset equal to pattern length (variation)
new MessageFormat("X{0}"),
// Offset 1 under pattern length (variation)
new MessageFormat("X{0}X")
Copy link
Member

Choose a reason for hiding this comment

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

Nit: "(variation)" may not be needed

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Oct 18, 2024
@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Oct 18, 2024
@openjdk openjdk bot added the ready Pull request is ready to be integrated label Oct 23, 2024
@justin-curtis-lu
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Oct 24, 2024

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

  • 7d5eefa: 8342862: Gtest added by 8339507 appears to be causing 8GB build machines to hang
  • d8c3b0f: 8342768: GTest AssemblerX86.validate_vm failed: assert(VM_Version::supports_bmi1()) failed: tzcnt instruction not supported
  • 3c14c2b: 8341566: Add Reader.of(CharSequence)
  • b0ac633: 8342075: HttpClient: improve HTTP/2 flow control checks
  • 85774b7: 8342882: RISC-V: Unify handling of jumps to runtime
  • 2c31c8e: 8339730: Windows regression after removing ObjectMonitor Responsible
  • f0b130e: 8339296: Record deconstruction pattern in switch fails to compile
  • e96b4cf: 8342387: C2 SuperWord: refactor and improve compiler/loopopts/superword/TestDependencyOffsets.java
  • f7a61fc: 8342931: ProblemList failing tests from JDK-8335912
  • 25c2f48: 8338544: Dedicated Array class descriptor implementation
  • ... and 87 more: https://git.openjdk.org/jdk/compare/236c71cad9fa269518456c11edcfb353bbfc084d...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Oct 24, 2024

@justin-curtis-lu Pushed as commit 7af46a6.

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

Development

Successfully merging this pull request may close these issues.

2 participants