From: root Date: Thu, 25 Jul 2019 20:59:59 +0000 (-0700) Subject: Bug fixes to atomic logic X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=04ffc0dafb0bfa78aa73b21359ca5b53622e675d;p=c11tester.git Bug fixes to atomic logic --- diff --git a/execution.cc b/execution.cc index 0710dd6b..af54b54a 100644 --- a/execution.cc +++ b/execution.cc @@ -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; } }