Skip to content

Conversation

@wkia
Copy link

@wkia wkia commented Feb 16, 2024

Clean backport.

I've just found that the issue occurs even with short strings like "*123*", see my screenshot attached to JDK-8069389. This can be reproduced currently with "slowdebug" build on my Ubuntu 22.04 + gcc-9.5.0, however I believe we cannot rely on it isn't reproduced with "release" now.

Anyway, it wasn't good to use "strcpy" with overlapped buffers, because strcpy's docs says "The behavior is undefined if the strings overlap." So, I believe it should be fixed in jdk8 as well.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8069389 needs maintainer approval

Issue

  • JDK-8069389: CompilerOracle prefix wildcarding is broken for long strings (Bug - P4 - Approved)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk8u-dev.git pull/446/head:pull/446
$ git checkout pull/446

Update a local copy of the PR:
$ git checkout pull/446
$ git pull https://git.openjdk.org/jdk8u-dev.git pull/446/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 446

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk8u-dev/pull/446.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 16, 2024

👋 Welcome back rmarchenko! 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 changed the title Backport 01ec6950020268a375eb5330373e6c0813f3a924 8069389: CompilerOracle prefix wildcarding is broken for long strings Feb 16, 2024
@openjdk
Copy link

openjdk bot commented Feb 16, 2024

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

@openjdk openjdk bot added backport Port of a pull request already in a different code base clean Identical backport; no merge resolution required labels Feb 16, 2024
@openjdk
Copy link

openjdk bot commented Feb 16, 2024

⚠️ @wkia This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 16, 2024
@mlbridge
Copy link

mlbridge bot commented Feb 16, 2024

Webrevs

@wkia wkia force-pushed the backport-01ec6950020268a375eb5330373e6c0813f3a924 branch from 9880ca8 to b2ae4d2 Compare February 16, 2024 18:39
@openjdk
Copy link

openjdk bot commented Feb 16, 2024

@wkia Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information.

@wkia
Copy link
Author

wkia commented Feb 16, 2024

/approval Clean backport

@openjdk
Copy link

openjdk bot commented Feb 16, 2024

@wkia usage: /approval [<id>] (request|cancel) [<text>]

@wkia
Copy link
Author

wkia commented Feb 16, 2024

/approval request Clean backport

@openjdk
Copy link

openjdk bot commented Feb 16, 2024

@wkia
8069389: The approval request has been created successfully.

@openjdk openjdk bot added the approval Requires approval; will be removed when approval is received label Feb 16, 2024
@wkia wkia force-pushed the backport-01ec6950020268a375eb5330373e6c0813f3a924 branch from b2ae4d2 to fb23dd6 Compare February 23, 2024 09:49
@openjdk
Copy link

openjdk bot commented Feb 23, 2024

@wkia Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information.

Copy link
Member

@gnu-andrew gnu-andrew left a comment

Choose a reason for hiding this comment

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

Does the new test pass on 8u?

@wkia
Copy link
Author

wkia commented Feb 26, 2024

@gnu-andrew Yes, it passed.

However, as just a note, my opinion is a test doesn't make sense here since we're trying to emulate a failure case which is actually caused by undefined behaviour. UB cannot be predicted or tested, and it may change depending on platform, versions, etc.

Anyway, the test passed.

@openjdk
Copy link

openjdk bot commented Mar 13, 2024

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

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

8069389: CompilerOracle prefix wildcarding is broken for long strings

Replace strcpy with memmove

Reviewed-by: andrew

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

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 (@gnu-andrew) 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).

Copy link
Member

@gnu-andrew gnu-andrew left a comment

Choose a reason for hiding this comment

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

Verified clean.

@gnu-andrew
Copy link
Member

/approve yes

@openjdk
Copy link

openjdk bot commented Apr 10, 2024

@gnu-andrew
8069389: The approval request has been approved.

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed approval Requires approval; will be removed when approval is received labels Apr 10, 2024
@wkia
Copy link
Author

wkia commented Apr 10, 2024

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Apr 10, 2024
@openjdk
Copy link

openjdk bot commented Apr 10, 2024

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

@gnu-andrew
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Apr 10, 2024

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

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Apr 10, 2024

@gnu-andrew @wkia Pushed as commit cde8aca.

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

@wkia wkia deleted the backport-01ec6950020268a375eb5330373e6c0813f3a924 branch April 10, 2024 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Port of a pull request already in a different code base clean Identical backport; no merge resolution required integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

2 participants