Bug fixes to atomic logic
authorroot <root@dw-6.eecs.uci.edu>
Thu, 25 Jul 2019 20:59:59 +0000 (13:59 -0700)
committerroot <root@dw-6.eecs.uci.edu>
Thu, 25 Jul 2019 20:59:59 +0000 (13:59 -0700)
execution.cc

index 0710dd6b68b26364591bbc6fa38b92db875c91ba..af54b54a54cc43e962c8606115eb10be467ddffa 100644 (file)
@@ -596,8 +596,8 @@ bool ModelExecution::process_fence(ModelAction *curr)
                                continue;
 
                        /* Establish hypothetical release sequences */
-                       ClockVector *cv = get_hb_from_write(act);
-                       if (curr->get_cv()->merge(cv))
+                       ClockVector *cv = get_hb_from_write(act->get_reads_from());
+                       if (cv != NULL && curr->get_cv()->merge(cv))
                                updated = true;
                }
        }
@@ -987,7 +987,7 @@ bool ModelExecution::r_modification_order(ModelAction *curr, const ModelAction *
                        if (act->happens_before(curr)) {
                                if (i==0) {
                                        if (last_sc_fence_local == NULL ||
-                                                       (*last_sc_fence_local < *prev_same_thread)) {
+                                                       (*last_sc_fence_local < *act)) {
                                                prev_same_thread = act;
                                        }
                                }