X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=blobdiff_plain;f=model.cc;h=b73d31a579051c94cb909cac5d7e8330cde00ee0;hp=6120f4d4d688d908fb66c47b848b3db472c9081b;hb=ff05fa2d8214200766cf442b47e3a7e1356341f8;hpb=aa5eb7b5cb804a25b547fc0ae733498cbb167276;ds=inline diff --git a/model.cc b/model.cc index 6120f4d4..b73d31a5 100644 --- a/model.cc +++ b/model.cc @@ -879,6 +879,8 @@ bool ModelChecker::process_fence(ModelAction *curr) /* Find X : is_read(X) && X --sb-> curr */ for (rit = list->rbegin(); rit != list->rend(); rit++) { ModelAction *act = *rit; + if (act == curr) + continue; if (act->get_tid() != curr->get_tid()) continue; /* Stop at the beginning of the thread */ @@ -897,7 +899,7 @@ bool ModelChecker::process_fence(ModelAction *curr) rel_heads_list_t release_heads; get_release_seq_heads(curr, act, &release_heads); for (unsigned int i = 0; i < release_heads.size(); i++) - if (!act->synchronize_with(release_heads[i])) + if (!curr->synchronize_with(release_heads[i])) set_bad_synchronization(); if (release_heads.size() != 0) updated = true;