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

8306331: assert((cnt > 0.0f) && (prob > 0.0f)) failed: Bad frequency assignment in if #13551

Closed
wants to merge 3 commits into from

Conversation

dean-long
Copy link
Member

@dean-long dean-long commented Apr 20, 2023

This change removes undefined behavior caused by signed overflow, which triggered an assert with Xcode14.3+1.0-beta1 on macos aarch64.


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-8306331: assert((cnt > 0.0f) && (prob > 0.0f)) failed: Bad frequency assignment in if

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 13551

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 20, 2023

👋 Welcome back dlong! 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 8306331: assert((cnt > 0.0f) && (prob > 0.0f)) failed: Bad frequency assignment in if 8306331: assert((cnt > 0.0f) && (prob > 0.0f)) failed: Bad frequency assignment in if Apr 20, 2023
@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 20, 2023
@openjdk
Copy link

openjdk bot commented Apr 20, 2023

@dean-long The following label will be automatically applied to this pull request:

  • hotspot-compiler

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-compiler hotspot-compiler-dev@openjdk.org label Apr 20, 2023
@mlbridge
Copy link

mlbridge bot commented Apr 20, 2023

Webrevs

Copy link
Member

@TobiHartmann TobiHartmann 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 to me.

src/hotspot/share/opto/parse2.cpp Outdated Show resolved Hide resolved
src/hotspot/share/opto/parse2.cpp Outdated Show resolved Hide resolved
@openjdk
Copy link

openjdk bot commented Apr 24, 2023

@dean-long 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:

8306331: assert((cnt > 0.0f) && (prob > 0.0f)) failed: Bad frequency assignment in if

Reviewed-by: thartmann, chagedorn

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

  • 35e7bc2: 8306855: [s390x] fix difference in abi sizes
  • 9ad6dc8: 8306774: Make runtime/Monitor/GuaranteedAsyncDeflationIntervalTest.java more reliable
  • c5910fa: 8306749: Make CardTable::invalidate non-virtual
  • 86f41a4: 8306735: G1: G1FullGCScope remove unnecessary member _explicit_gc
  • d747698: 8306823: Native memory leak in SharedRuntime::notify_jvmti_unmount/mount.
  • 8d89992: 8298189: Regression in SPECjvm2008-MonteCarlo for pre-Cascade Lake Intel processors
  • 44d9f55: 8306072: Open source several AWT MouseInfo related tests
  • cc894d8: 8303466: C2: failed: malformed control flow. Limit type made precise with MaxL/MinL
  • ed1ebd2: 8306652: Open source AWT MenuItem related tests
  • f3e8bd1: 8306755: Open source few Swing JComponent and AbstractButton tests
  • ... and 86 more: https://git.openjdk.org/jdk/compare/b8f0a668dd69b831d9f0e617ac3cb65830f69909...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 Apr 24, 2023
dean-long and others added 2 commits April 24, 2023 10:58
Co-authored-by: Tobias Hartmann <tobias.hartmann@oracle.com>
Co-authored-by: Tobias Hartmann <tobias.hartmann@oracle.com>
@dean-long
Copy link
Member Author

Thanks Tobias.

@dean-long
Copy link
Member Author

After looking at the code again, I was wondering if anyone prefers using "count" instead of "counter" here, so this:

static bool counters_are_meaningful(int counter1, int counter2, int min) {

would become this:

static bool counts_are_meaningful(int count1, int count2, int min) {

@TobiHartmann
Copy link
Member

Sounds reasonable to me.

@dean-long
Copy link
Member Author

I think I'll just leave the names as-is. The comments in the code seem to use "count" and "counter" interchangeably.

Copy link
Member

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

@dean-long
Copy link
Member Author

Thanks Christian.

@dean-long
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Apr 28, 2023

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

  • e119658: 8303475: potential null pointer dereference in filemap.cpp
  • cf799ba: 8306950: [REDO] JDK-8305252 make_method_handle_intrinsic may call java code under a lock
  • 485a069: 8306432: Open source several AWT Text Component related tests
  • 169a7c2: 8306640: Open source several AWT TextArea related tests
  • 5d9baa2: 8306672: support offset in dll_address_to_library_name on AIX
  • 83a98c6: 8307063: When cross-compiling with hsdis/binutils, buildjdk creation fails
  • 452cb84: 8307103: Two TestMetaspaceAllocationMT tests fail after JDK-8306696
  • fee02f0: 8299748: java/util/zip/Deinflate.java failing on s390x
  • 60a29a6: 8305387: JDK-8301995 breaks arm 32-bit
  • 3d9d84b: 8307006: ProblemList gtest/NMTGtest.java on aix
  • ... and 131 more: https://git.openjdk.org/jdk/compare/b8f0a668dd69b831d9f0e617ac3cb65830f69909...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Apr 28, 2023

@dean-long Pushed as commit a177152.

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