Skip to content

8266496: WBIsKlassAliveClosure.do_klass() fails for hidden classes #3882

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

Closed
wants to merge 2 commits into from

Conversation

hseigel
Copy link
Member

@hseigel hseigel commented May 5, 2021

Please review this small fix for JDK-8266496. The fix changes WBIsKlassAliveClosure.do_klass() so that when it compares the specified name with the name of a hidden class, it truncates the hidden class's name at the first '+' character before doing the comparison. This should work except in the rare case when the pre-mangled hidden class name contains a '+' character.

The fix was tested with Mach5 tiers 1 and 2 on Linux, Mac OS, and Windows, and tiers 3-5 on Linux x64.

Thanks, Harold


Progress

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

Issue

  • JDK-8266496: WBIsKlassAliveClosure.do_klass() fails for hidden classes

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3882

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented May 5, 2021

👋 Welcome back hseigel! 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 May 5, 2021
@openjdk
Copy link

openjdk bot commented May 5, 2021

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

  • hotspot

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 hotspot hotspot-dev@openjdk.org label May 5, 2021
@hseigel
Copy link
Member Author

hseigel commented May 5, 2021

/label remove hotspot
/label add hotspot-runtime

@openjdk openjdk bot removed the hotspot hotspot-dev@openjdk.org label May 5, 2021
@openjdk
Copy link

openjdk bot commented May 5, 2021

@hseigel
The hotspot label was successfully removed.

@openjdk openjdk bot added the hotspot-runtime hotspot-runtime-dev@openjdk.org label May 5, 2021
@openjdk
Copy link

openjdk bot commented May 5, 2021

@hseigel
The hotspot-runtime label was successfully added.

@mlbridge
Copy link

mlbridge bot commented May 5, 2021

Webrevs

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

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

Hi Harold,

Fix seems fine - certainly good enough for whitebox purposes.

Does the test need to generate the classfile? can't you just define a class in the same source file and then read the class file from disk? Whenever I see asm being used I wonder what it is about the class that prevented it being written in Java.

Thanks,
David

@openjdk
Copy link

openjdk bot commented May 5, 2021

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

8266496: WBIsKlassAliveClosure.do_klass() fails for hidden classes

Reviewed-by: dholmes, coleenp, mseledtsov, lfoltan

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

  • 138d573: 8262392: Update Mesa 3-D Headers to version 21.0.3
  • 9de62a4: 8266505: Cleanup LibraryCallKit::make_unsafe_address()
  • 1885c83: 8266504: Remove leftovers from BarrierSetAssemblerC1
  • 6018336: 8259316: [REDO] C1/C2 compiler support for blackholes
  • f07bb2f: 8250766: javadoc adds redundant spaces when @see program element is wrapped
  • 61bb6ec: 8266453: Shenandoah: Disable write protections before patching nmethod in nmethod_barrier on MacOSX/AArch64
  • a05e8e2: 8266497: Remove unnecessary EMCP liveness indication
  • 6ba911d: 8266498: Make debug ps() call print_stack

Please see this link for an up-to-date comparison between the source branch of this pull request and 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.

➡️ 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 May 5, 2021
@hseigel
Copy link
Member Author

hseigel commented May 5, 2021

Hi David,
Thanks for reviewing this. The test doesn't need to use asm. It could load the class from disk as you suggested, or even use InMemoryJavaCompiler. Please let me know if I should change the test.

Thanks, Harold

Copy link
Contributor

@coleenp coleenp left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@mseledts mseledts left a comment

Choose a reason for hiding this comment

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

Change looks good to me.

Copy link
Member

@lfoltan lfoltan left a comment

Choose a reason for hiding this comment

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

Looks good.
Lois

@dholmes-ora
Copy link
Member

No need to change test.

Thanks,
David

@hseigel
Copy link
Member Author

hseigel commented May 6, 2021

Thanks David, Coleen, Misha and Lois for the reviews.

/integrate

@openjdk openjdk bot closed this May 6, 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 May 6, 2021
@openjdk
Copy link

openjdk bot commented May 6, 2021

@hseigel Since your change was applied there have been 16 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

Pushed as commit eb3b96d.

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

Successfully merging this pull request may close these issues.

5 participants