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

8254314: Shenandoah: null checks in c2 should not skip over native load barrier #576

wants to merge 1 commit into from


Copy link

@rwestrel rwestrel commented Oct 9, 2020

C2 optimizes (CmpP (LoadBarrier o) NULL) as (CmpP o NULL). The ative
load barrier is not guaranteed to return a non null oop when passed a
non null oop so this optimization could lead to a crash.

/cc shenandoah,hotspot-compiler


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


Linux x64 Windows x64 macOS x64
Build (2/5 failed) ✔️ (2/2 passed) ✔️ (2/2 passed)
Build / test ✔️ (0/0 passed)
Test (tier1) ✔️ (9/9 passed) ✔️ (9/9 passed)

Failed test tasks


  • JDK-8254314: Shenandoah: null checks in c2 should not skip over native load barrier



$ git fetch pull/576/head:pull/576
$ git checkout pull/576

Copy link

@bridgekeeper bridgekeeper bot commented Oct 9, 2020

👋 Welcome back roland! 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.

@rwestrel rwestrel marked this pull request as draft Oct 9, 2020
Copy link

@openjdk openjdk bot commented Oct 9, 2020

The shenandoah label was successfully added.

The hotspot-compiler label was successfully added.

@rwestrel rwestrel marked this pull request as ready for review Oct 9, 2020
@openjdk openjdk bot added the rfr label Oct 9, 2020
rkennke approved these changes Oct 9, 2020
Copy link

@rkennke rkennke left a comment

It looks good to me! While this doesn't seem to reproduce with normal native-barriers yet, it's been a major headache in the ongoing work on concurrent weak reference processing, and I don't see why normal native-barriers wouldn't be affected by it. We've probably been lucky so far.

Copy link

@openjdk openjdk bot commented Oct 9, 2020

@rwestrel This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file for details.

After integration, the commit message for the final commit will be:

8254314: Shenandoah: null checks in c2 should not skip over native load barrier

Reviewed-by: rkennke

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

  • 2bbf8a2: 8245543: Cgroups: Incorrect detection logic on some systems (still reproducible)
  • aaa0a2a: 8254297: Zero and Minimal VMs are broken with undeclared identifier 'DerivedPointerTable' after JDK-8253180
  • 7e80c98: 8254261: fix javadocs in jdk.test.lib.Utils
  • d4b5dfd: 8253857: Shenandoah: Bugs in ShenandoahEvacOOMHandler related code
  • e9c1905: 8253740: [PPC64] Minor interpreter cleanup
  • b1448da: 8253900: SA: wrong size computation when JVM was built without AOT

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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 Oct 9, 2020
Copy link

@mlbridge mlbridge bot commented Oct 9, 2020


Copy link
Contributor Author

@rwestrel rwestrel commented Oct 12, 2020


@openjdk openjdk bot closed this Oct 12, 2020
@openjdk openjdk bot added integrated and removed ready rfr labels Oct 12, 2020
Copy link

@openjdk openjdk bot commented Oct 12, 2020

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

  • c73a0ff: 8252105: Parallel heap inspection for ZCollectedHeap
  • 45b09a3: 8253833: mutexLocker assert_locked_or_safepoint should not access VMThread state from non-VM-thread
  • 77c7762: 8254353: Remove unused non-product flags
  • d3069ac: 8254362: x86_32 builds fail after JDK-8253180
  • 25001c5: 8254352: 3 compiler tests failed with "assert(allocates2(pc)) failed: not in CodeBuffer memory"
  • d43f141: 8254351: Minimal VM build fails with undeclared identifier 'MaxVectorSize' after JDK-8252847
  • cc52358: 8254335: logging/logStream.hpp includes memory/resourceArea.hpp but doesn't need it
  • 4b5ac3a: 8252847: Optimize primitive arrayCopy stubs using AVX-512 masked instructions
  • ec41046: 8254348: Build fails when cds is disabled after JDK-8247536
  • e4469d2: 8247536: Support for pre-generated java.lang.invoke classes in CDS static archive
  • ... and 11 more:

Your commit was automatically rebased without conflicts.

Pushed as commit a2bb4c6.

💡 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
2 participants