8214857: "bad trailing membar" assert failure at memnode.cpp:3220
authorroland
Mon, 03 Dec 2018 10:51:03 +0100
changeset 52873 6e7db888f04c
parent 52872 357d2b80748d
child 52874 c45a5b46461b
8214857: "bad trailing membar" assert failure at memnode.cpp:3220 Reviewed-by: adinn, thartmann
src/hotspot/share/opto/memnode.cpp
--- a/src/hotspot/share/opto/memnode.cpp	Thu Dec 06 12:51:13 2018 +0100
+++ b/src/hotspot/share/opto/memnode.cpp	Mon Dec 03 10:51:03 2018 +0100
@@ -3230,7 +3230,7 @@
   while (leading != NULL && (!leading->is_MemBar() || !leading->as_MemBar()->leading())) {
     while (leading == NULL || leading->is_top() || seen.test_set(leading->_idx)) {
       leading = NULL;
-      while (regions.size() > 0) {
+      while (regions.size() > 0 && leading == NULL) {
         Node* r = regions.node();
         uint i = regions.index();
         if (i < r->req()) {