bug fix with missing coherence condition for promises
authorbdemsky <bdemsky@uci.edu>
Wed, 16 Apr 2014 22:01:00 +0000 (15:01 -0700)
committerbdemsky <bdemsky@uci.edu>
Wed, 16 Apr 2014 22:01:00 +0000 (15:01 -0700)
execution.cc

index 3a630d7..01a5fa4 100644 (file)
@@ -1753,9 +1753,10 @@ bool ModelExecution::w_modification_order(ModelAction *curr, ModelVector<ModelAc
                                        added = mo_graph->addEdge(act, curr) || added;
                                else if (act->is_read()) {
                                        //if previous read accessed a null, just keep going
-                                       if (act->get_reads_from() == NULL)
-                                               continue;
-                                       added = mo_graph->addEdge(act->get_reads_from(), curr) || added;
+                                       if (act->get_reads_from() == NULL) {
+                                               added = mo_graph->addEdge(act->get_reads_from_promise(), curr) || added;
+                                       } else
+                                               added = mo_graph->addEdge(act->get_reads_from(), curr) || added;
                                }
                                break;
                        } else if (act->is_read() && !act->could_synchronize_with(curr) &&