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

8240281: Remove failing assertion code when selecting first memory state in SuperWord::co_locate_pack #2495

Closed
wants to merge 2 commits into from

Conversation

@chhagedorn
Copy link
Member

@chhagedorn chhagedorn commented Feb 10, 2021

While working on JDK-8238438, it was not clear if there is a case where SuperWord::co_locate_pack() should pick the memory state of the first load of a pack. We could not find an example and therefore added an assert(false) and left the code there to clean it up at some point if the assert was never hit.

Now, a newly found fuzzer test showed that are cases where we need to pick the first memory state, triggering the assert(false). In the test case test(), a store and a load pack are created but the store pack is filtered in SuperWord::filter_packs(). The load x += iArrFld[j] must read the old value before the store iArrFld[j] = j overrides it. Therefore, the load vector must be executed before any of the stores to iArrFld[j]. This, however, is not the case if we pick the memory state of the last load which results in wrong values for iArrFld: The stores and the loads are dependent and some of the stores are already executed before the load vector.

The fix is to remove the assertion code added by JDK-8238438 and keep the code for selecting the first memory state of a load pack.

Thanks,
Christian


Progress

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

Issue

  • JDK-8240281: Remove failing assertion code when selecting first memory state in SuperWord::co_locate_pack

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/2495/head:pull/2495
$ git checkout pull/2495

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Feb 10, 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
Copy link

@openjdk openjdk bot commented Feb 10, 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 rfr label Feb 10, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Feb 10, 2021

Webrevs

Copy link
Contributor

@rwestrel rwestrel left a comment

Looks good to me.

@openjdk
Copy link

@openjdk openjdk bot commented Feb 10, 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:

8240281: Remove failing assertion code when selecting first memory state in SuperWord::co_locate_pack

Reviewed-by: roland, 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 47 new commits pushed to the master branch:

  • 837bd89: 8261548: ProblemList runtime/NMT/CheckForProperDetailStackTrace.java
  • adca84c: 8260341: CDS dump VM init code does not check exceptions
  • 447db62: 6211198: ICC_Profile.getInstance(byte[]): IAE is not specified
  • cc5691c: 8248162: serviceability/attach/RemovingUnixDomainSocketTest.java failed
  • 40754f1: 4841153: java.awt.geom.Rectangle2D.add(double,double) documented incorrectly
  • 4caeb39: 8260380: Upgrade to LittleCMS 2.12
  • a772639: 8261298: LinuxPackage.c, getJvmLauncherLibPath RPM->DEB typo
  • 52fc01b: 8261268: LOAD_INSTANCE placeholders unneeded for parallelCapable class loaders
  • a3d6e37: 8261302: NMT: Improve malloc site table hashing
  • ad54d8d: 8260934: java/lang/StringBuilder/HugeCapacity.java fails without Compact Strings
  • ... and 37 more: https://git.openjdk.java.net/jdk/compare/deb0544ff330fadc5aac0378766bcd36c220d7e2...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 label Feb 10, 2021
@chhagedorn
Copy link
Member Author

@chhagedorn chhagedorn commented Feb 10, 2021

Thank you Roland for your review!

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Good.

Copy link
Member

@TobiHartmann TobiHartmann left a comment

Looks good. Great that we finally have a test for this case!

@chhagedorn
Copy link
Member Author

@chhagedorn chhagedorn commented Feb 11, 2021

Thanks Vladimir and Tobias for your reviews! Yes, it's good to finally have a testcase for it. Was already thinking about cleaning this code up soon - good that I've waited.

@chhagedorn
Copy link
Member Author

@chhagedorn chhagedorn commented Feb 11, 2021

/integrate

@openjdk openjdk bot closed this Feb 11, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Feb 11, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Feb 11, 2021

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

  • 9fed604: 8261300: jpackage: rewrite while(0)/while(false) to proper blocks
  • 8b6ab31: 8261418: Reduce decoder creation overheads for sun.nio.cs.ext Charsets
  • 5e1b809: 8261444: Remove unused fields in Lower
  • a9c3680: 8261250: Dependencies: Remove unused dependency types
  • 3ede231: 8259430: C2: assert(in_vt->length() == out_vt->length()) failed: mismatch on number of elements
  • 1662373: 8235139: Deprecate the socket impl factory mechanism
  • 49cf13d: 8261449: Micro-optimize JVM_LatestUserDefinedLoader
  • 837bd89: 8261548: ProblemList runtime/NMT/CheckForProperDetailStackTrace.java
  • adca84c: 8260341: CDS dump VM init code does not check exceptions
  • 447db62: 6211198: ICC_Profile.getInstance(byte[]): IAE is not specified
  • ... and 44 more: https://git.openjdk.java.net/jdk/compare/deb0544ff330fadc5aac0378766bcd36c220d7e2...master

Your commit was automatically rebased without conflicts.

Pushed as commit 0a89987.

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

@chhagedorn chhagedorn deleted the JDK-8240281 branch May 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants