model: bugfix - don't clobber 'updated'
authorBrian Norris <banorris@uci.edu>
Thu, 13 Sep 2012 21:58:36 +0000 (14:58 -0700)
committerBrian Norris <banorris@uci.edu>
Thu, 13 Sep 2012 21:58:36 +0000 (14:58 -0700)
The 'updated' variable should stay 'true' even if modification orders and
promises aren't updated by the "write" checks. This could be a RMW which made
updates via the "read" checks.

model.cc

index 1cde35462588ce1a63727937a99872799ac33317..d23e9946d8c32628f36c1a2685d07a7c9ea93b8e 100644 (file)
--- a/model.cc
+++ b/model.cc
@@ -401,7 +401,7 @@ Thread * ModelChecker::check_current_action(ModelAction *curr)
        if (curr->is_write()) {
                bool updated_mod_order = w_modification_order(curr);
                bool updated_promises = resolve_promises(curr);
-               updated = updated_mod_order || updated_promises;
+               updated = updated || updated_mod_order || updated_promises;
 
                if (promises->size()==0) {
                        for (unsigned int i = 0; i<futurevalues->size(); i++) {