changeset 8314:73ba6fb1df04

8157306: Random infrequent null pointer exceptions in javac Reviewed-by: kvn
author aph
date Thu, 23 Jun 2016 17:58:59 +0000
parents d55ea2916525
children 2198ef7e1c17
files src/share/vm/opto/lcm.cpp
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/opto/lcm.cpp	Thu Jul 28 16:09:31 2016 +0300
+++ b/src/share/vm/opto/lcm.cpp	Thu Jun 23 17:58:59 2016 +0000
@@ -1088,11 +1088,12 @@
     Block *sb = block->_succs[i];
     // Clone the entire area; ignoring the edge fixup for now.
     for( uint j = end; j > beg; j-- ) {
-      // It is safe here to clone a node with anti_dependence
-      // since clones dominate on each path.
       Node *clone = block->get_node(j-1)->clone();
       sb->insert_node(clone, 1);
       map_node_to_block(clone, sb);
+      if (clone->needs_anti_dependence_check()) {
+        insert_anti_dependences(sb, clone);
+      }
     }
   }