Bug fix
authorbdemsky <bdemsky@uci.edu>
Wed, 22 Jul 2020 18:44:20 +0000 (11:44 -0700)
committerbdemsky <bdemsky@uci.edu>
Wed, 22 Jul 2020 18:44:20 +0000 (11:44 -0700)
execution.cc

index ce9fa35..53b6bcc 100644 (file)
@@ -1198,8 +1198,12 @@ ClockVector * ModelExecution::get_hb_from_write(ModelAction *rf) const {
                                else
                                        (vec=new ClockVector(vec, NULL))->merge(rf->get_last_fence_release()->get_cv());
                        } else {
-                               if (vec == NULL && rf->is_rmw()) {
-                                       vec = new ClockVector(NULL, NULL);
+                               if (vec == NULL) {
+                                       if (rf->is_rmw()) {
+                                               vec = new ClockVector(NULL, NULL);
+                                       }
+                               } else {
+                                       vec = new ClockVector(vec, NULL);
                                }
                        }
                        rf->set_rfcv(vec);