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

JDK-8318626: GetClassFields does not filter out ConstantPool.constantPoolOop field #16328

Closed
wants to merge 2 commits into from

Conversation

alexmenkov
Copy link

@alexmenkov alexmenkov commented Oct 24, 2023

FilteredFieldStream is intended to filter out some fields which does not represent valid java objects.
Currently the only filtered field is "constantPoolOop" from jdk.internal.reflect.ConstantPool class.
The change fixes FilteredFieldStream implementation to handle cases when filtered fields is the last field of the class ("constantPoolOop" is the only field of jdk.internal.reflect.ConstantPool)

Testing:

  • new test added that compares results of GetClassFields JVMTI function (it uses FilteredFieldStream) with Class.getDeclaredFields();
  • test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetClassFields tests

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-8318626: GetClassFields does not filter out ConstantPool.constantPoolOop field (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 16328

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 24, 2023

👋 Welcome back amenkov! 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 Oct 24, 2023
@openjdk
Copy link

openjdk bot commented Oct 24, 2023

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

  • hotspot-runtime
  • serviceability

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 serviceability serviceability-dev@openjdk.org hotspot-runtime hotspot-runtime-dev@openjdk.org labels Oct 24, 2023
@mlbridge
Copy link

mlbridge bot commented Oct 24, 2023

Webrevs

Copy link
Contributor

@sspitsyn sspitsyn left a comment

Choose a reason for hiding this comment

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

The fix itself looks good. I've posted a couple of nits on the new test.
Thanks,
Serguei

@openjdk
Copy link

openjdk bot commented Oct 28, 2023

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

8318626: GetClassFields does not filter out ConstantPool.constantPoolOop field

Reviewed-by: sspitsyn, lmesnik

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

  • 2c4c6c9: 8320049: PKCS10 would not discard the cause when throw SignatureException on invalid key
  • f93b18f: 8320932: [BACKOUT] dsymutil command leaves around temporary directories
  • ce4e6e2: 8320915: Update copyright year in build files
  • 21d361e: 8320525: G1: G1UpdateRemSetTrackingBeforeRebuild::distribute_marked_bytes accesses partially unloaded klass
  • dc256fb: 8320061: [nmt] Multiple issues with peak accounting
  • adad132: 8320767: Use := wherever possible in spec.gmk.in
  • 69c0b24: 8320714: java/util/Locale/LocaleProvidersRun.java and java/util/ResourceBundle/modules/visibility/VisibilityTest.java timeout after passing
  • 66ae6d5: 8320899: Select the correct Makefile when running make in build directory
  • ebbef62: 8320769: Remove ill-adviced "make install" target
  • 86bb804: 8320863: dsymutil command leaves around temporary directories
  • ... and 444 more: https://git.openjdk.org/jdk/compare/1b150117fd9ccb7ff8adc012b74d7d95e5219b94...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 Oct 28, 2023
Copy link
Contributor

@sspitsyn sspitsyn left a comment

Choose a reason for hiding this comment

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

Thank you for the update! Looks good.

@alexmenkov
Copy link
Author

/integrate

@openjdk
Copy link

openjdk bot commented Nov 29, 2023

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

  • ea6e92e: 8320945: problemlist tests failing on latest Windows 11 update
  • 2584bf8: 8210410: Refactor java.util.Currency:i18n shell tests to plain java tests
  • 454b116: 8320942: Only set openjdk-target when cross compiling linux-aarch64
  • eb44baf: 8320937: support latest VS2022 MSC_VER in abstract_vm_version.cpp
  • 62418c6: 8319444: Unhelpful failure output in TestLegalNotices
  • cdd1a6e: 8313816: Accessing jmethodID might lead to spurious crashes
  • b65ccff: 8320877: Shenandoah: Remove ShenandoahUnloadClassesFrequency support
  • b68356b: 8320806: Augment test/langtools/tools/javac/versions/Versions.java for JDK 22 language changes
  • d783aa3: 8320940: Fix typo in java.lang.Double
  • 43c7f6a: 8320907: Shenandoah: Remove ShenandoahSelfFixing flag
  • ... and 471 more: https://git.openjdk.org/jdk/compare/1b150117fd9ccb7ff8adc012b74d7d95e5219b94...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Nov 29, 2023

@alexmenkov Pushed as commit d1e73b1.

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

@alexmenkov alexmenkov deleted the FilteredFields branch November 29, 2023 20:13
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 serviceability serviceability-dev@openjdk.org
3 participants