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

8293295: Add type check asserts to java_lang_ref_Reference accessors #10139

Closed
wants to merge 2 commits into from

Conversation

xmas92
Copy link
Member

@xmas92 xmas92 commented Sep 2, 2022

From a discussion in JDK-8293207 / #10117 it was brought up that the Weak/Soft and Phantom specific accessor in java_lang_ref_Reference does not assert that the type is valid.

Testing: Oracle platforms tier 1-4


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-8293295: Add type check asserts to java_lang_ref_Reference accessors

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10139

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 2, 2022

👋 Welcome back aboldtch! 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 Sep 2, 2022
@openjdk
Copy link

openjdk bot commented Sep 2, 2022

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

  • hotspot-runtime

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-runtime hotspot-runtime-dev@openjdk.org label Sep 2, 2022
@mlbridge
Copy link

mlbridge bot commented Sep 2, 2022

Webrevs

Copy link
Member

@stefank stefank left a comment

Choose a reason for hiding this comment

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

Given that "!is_phantom" returns true for FinalReferences, maybe we should change this to explicitly check if the ref is Weak or Soft?

@xmas92
Copy link
Member Author

xmas92 commented Sep 2, 2022

Given that "!is_phantom" returns true for FinalReferences, maybe we should change this to explicitly check if the ref is Weak or Soft?

Added is_weak and is_soft to make it more correct with respect to FinalReference. This will also be more correct if a REF_NONE ever finds its way into these accessors.

Copy link
Member

@stefank stefank 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!

@openjdk
Copy link

openjdk bot commented Sep 2, 2022

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

8293295: Add type check asserts to java_lang_ref_Reference accessors

Reviewed-by: stefank, kbarrett, coleenp

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

  • e945619: 8293088: Fix compilation with the new Visual Studio preprocessor
  • 730ced9: 8292660: C2: blocks made unreachable by NeverBranch-to-Goto conversion are removed incorrectly
  • 3464019: 8292899: CustomTzIDCheckDST.java testcase failed on AIX platform
  • e92b9e4: 8293325: Minor improvements to macos catch_mach_exception_raise() error handling
  • 767262e: 8292201: serviceability/sa/ClhsdbThreadContext.java fails with "'Thread "Common-Cleaner"' missing from stdout/stderr"
  • a366e82: 7113208: Incorrect javadoc on java.net.DatagramPacket.setLength()
  • ac05bc8: 8293293: Move archive heap loading code out of heapShared.cpp
  • e1e6732: 8293319: [C2 cleanup] Remove unused other_path arg in Parse::adjust_map_after_if
  • 5757e21: 8292385: assert(ctrl == kit.control()) failed: Control flow was added although the intrinsic bailed out
  • 3993a1f: 8292067: Convert test/sun/management/jmxremote/bootstrap shell tests to java version
  • ... and 33 more: https://git.openjdk.org/jdk/compare/17283cfe4c697e2118f19992a6e87dbee268061e...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.

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 (@stefank, @kimbarrett, @coleenp) 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).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 2, 2022
Copy link

@kimbarrett kimbarrett 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.

@stefank
Copy link
Member

stefank commented Sep 5, 2022

/sponsor

@openjdk
Copy link

openjdk bot commented Sep 5, 2022

@stefank The change author (@xmas92) must issue an integrate command before the integration can be sponsored.

@xmas92
Copy link
Member Author

xmas92 commented Sep 5, 2022

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Sep 5, 2022
@openjdk
Copy link

openjdk bot commented Sep 5, 2022

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

@stefank
Copy link
Member

stefank commented Sep 5, 2022

/sponsor

@openjdk
Copy link

openjdk bot commented Sep 5, 2022

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

  • e945619: 8293088: Fix compilation with the new Visual Studio preprocessor
  • 730ced9: 8292660: C2: blocks made unreachable by NeverBranch-to-Goto conversion are removed incorrectly
  • 3464019: 8292899: CustomTzIDCheckDST.java testcase failed on AIX platform
  • e92b9e4: 8293325: Minor improvements to macos catch_mach_exception_raise() error handling
  • 767262e: 8292201: serviceability/sa/ClhsdbThreadContext.java fails with "'Thread "Common-Cleaner"' missing from stdout/stderr"
  • a366e82: 7113208: Incorrect javadoc on java.net.DatagramPacket.setLength()
  • ac05bc8: 8293293: Move archive heap loading code out of heapShared.cpp
  • e1e6732: 8293319: [C2 cleanup] Remove unused other_path arg in Parse::adjust_map_after_if
  • 5757e21: 8292385: assert(ctrl == kit.control()) failed: Control flow was added although the intrinsic bailed out
  • 3993a1f: 8292067: Convert test/sun/management/jmxremote/bootstrap shell tests to java version
  • ... and 33 more: https://git.openjdk.org/jdk/compare/17283cfe4c697e2118f19992a6e87dbee268061e...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Sep 5, 2022

@stefank @xmas92 Pushed as commit 32f4dc8.

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

@openjdk openjdk bot removed the sponsor Pull request is ready to be sponsored label Sep 5, 2022
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
4 participants