execution: bugfix - backtrack seq-cst fences properly
authorBrian Norris <banorris@uci.edu>
Wed, 17 Apr 2013 17:46:19 +0000 (10:46 -0700)
committerBrian Norris <banorris@uci.edu>
Wed, 17 Apr 2013 18:02:29 +0000 (11:02 -0700)
The commented-out ATOMIC_FENCE should not be commented out; the note
that "fences don't directly cause backtracking" is false for seq-cst
fences. We intend to backtrack for all seq-cst fences, so we need to
perform the appropriate 'get conflict' search for all fences.

execution.cc

index e962b92da41bb57193fc1bbcbf0b386514a35ec2..fc2370616388d0c60acf8048fceee307e33ef269 100644 (file)
@@ -366,7 +366,10 @@ ModelAction * ModelExecution::get_last_fence_conflict(ModelAction *act) const
 ModelAction * ModelExecution::get_last_conflict(ModelAction *act) const
 {
        switch (act->get_type()) {
-       /* case ATOMIC_FENCE: fences don't directly cause backtracking */
+       case ATOMIC_FENCE:
+               /* Only seq-cst fences can (directly) cause backtracking */
+               if (!act->is_seqcst())
+                       break;
        case ATOMIC_READ:
        case ATOMIC_WRITE:
        case ATOMIC_RMW: {