Skip to content
This repository was archived by the owner on Sep 2, 2022. It is now read-only.

Conversation

@chhagedorn
Copy link
Member

@chhagedorn chhagedorn commented Jan 6, 2021

This bug is very similar to JDK-8257822. In this testcase, a Div node has no longer its zero check as direct control input and is later moved before the zero check by IfNode::dominated_by() which updates all data nodes to a dominating If (in JDK-8257822 it was done by PhaseIdealLoop::dominated_by()) .

I suggest to use the same fix for IfNode::dominated_by() as for PhaseIdealLoop::dominated_by() in JDK-8257822 to only move data nodes to the dominating If if it is not a Div or Mod node that could have a zero divisor (i.e. a zero check).

Thanks,
Christian


Progress

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

Issue

  • JDK-8259227: C2 crashes with SIGFPE due to a division that floats above its zero check

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk16 pull/89/head:pull/89
$ git checkout pull/89

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 6, 2021

👋 Welcome back chagedorn! 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 Jan 6, 2021
@openjdk
Copy link

openjdk bot commented Jan 6, 2021

@chhagedorn 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.java.net label Jan 6, 2021
@mlbridge
Copy link

mlbridge bot commented Jan 6, 2021

Webrevs

Copy link

@vnkozlov vnkozlov 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 Jan 6, 2021

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

8259227: C2 crashes with SIGFPE due to a division that floats above its zero check

Reviewed-by: kvn, thartmann

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

  • 4a478b8: 8250903: jdk/jfr/javaagent/TestLoadedAgent.java fails with Mismatch in TestEvent count
  • 4f914e2: 8249633: doclint reports missing javadoc for JavaFX property methods that have a property description
  • eef43be: 8251200: False positive messages about missing comments for serialization
  • f1bc4e0: 8259312: VerifyCACerts.java fails as soneraclass2ca cert will expire in 90 days
  • 4a5786b: 8259075: Update the copyright notice in the files generated by CLDR Converter tool
  • d25a1be: 8259224: (ann) getAnnotatedReceiverType should not parameterize owner(s) of statically nested classes
  • ad45678: 8258558: Revert changes for JDK-8252505 and related issues
  • e66187d: 8259032: MappedMemorySegmentImpl#makeMappedSegment() ignores Unmapper#pagePosition
  • 80110da: 8259007: This test printed a blank page
  • 554e60c: 8258989: JVM is failed to inline in jdk.internal.vm.vector.VectorSupport::convert
  • ... and 3 more: https://git.openjdk.java.net/jdk16/compare/bbc2e9510bb32d69d823bd572b6c0c02bd2335af...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 Jan 6, 2021
@chhagedorn
Copy link
Member Author

Thanks for your review Vladimir!

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.

Otherwise looks good to me.

* @summary Verify that zero check is executed before division/modulo operation.
* @requires vm.compiler2.enabled
* @run main/othervm -Xcomp -XX:-TieredCompilation -XX:CompileOnly=compiler/loopopts/TestDivZeroDominatedBy::test
* -XX:+UnlockDiagnosticVMOptions -XX:+StressGCM -XX:StressSeed=917280111 compiler.loopopts.TestDivZeroDominatedBy
Copy link
Member

Choose a reason for hiding this comment

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

Just wondering if the StressSeed should really be hardcoded? If things change in the VM, this seed might not longer reproduce the issue. Maybe add another @run with no fixed seed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea. I also updated the test from JDK-8257822 with such an additional run.

Add additional runs without fixed seed
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.

Thanks for updating, looks good!

@chhagedorn
Copy link
Member Author

Thanks Tobias for your review!

@chhagedorn
Copy link
Member Author

/integrate

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

openjdk bot commented Jan 7, 2021

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

  • 484e23b: 8258657: Doc build is broken by use of new language features
  • 4a478b8: 8250903: jdk/jfr/javaagent/TestLoadedAgent.java fails with Mismatch in TestEvent count
  • 4f914e2: 8249633: doclint reports missing javadoc for JavaFX property methods that have a property description
  • eef43be: 8251200: False positive messages about missing comments for serialization
  • f1bc4e0: 8259312: VerifyCACerts.java fails as soneraclass2ca cert will expire in 90 days
  • 4a5786b: 8259075: Update the copyright notice in the files generated by CLDR Converter tool
  • d25a1be: 8259224: (ann) getAnnotatedReceiverType should not parameterize owner(s) of statically nested classes
  • ad45678: 8258558: Revert changes for JDK-8252505 and related issues
  • e66187d: 8259032: MappedMemorySegmentImpl#makeMappedSegment() ignores Unmapper#pagePosition
  • 80110da: 8259007: This test printed a blank page
  • ... and 4 more: https://git.openjdk.java.net/jdk16/compare/bbc2e9510bb32d69d823bd572b6c0c02bd2335af...master

Your commit was automatically rebased without conflicts.

Pushed as commit c1fb521.

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

hotspot-compiler hotspot-compiler-dev@openjdk.java.net integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants