changes to allow running programs with racing initialization...
authorBrian Demsky <bdemsky@uci.edu>
Fri, 26 Oct 2012 23:31:20 +0000 (16:31 -0700)
committerBrian Demsky <bdemsky@uci.edu>
Fri, 26 Oct 2012 23:31:20 +0000 (16:31 -0700)
model.cc

index e592673..f8aa4f0 100644 (file)
--- a/model.cc
+++ b/model.cc
@@ -1994,6 +1994,7 @@ void ModelChecker::build_reads_from_past(ModelAction *curr)
        if (!initialized) {
                /** @todo Need a more informative way of reporting errors. */
                printf("ERROR: may read from uninitialized atomic\n");
        if (!initialized) {
                /** @todo Need a more informative way of reporting errors. */
                printf("ERROR: may read from uninitialized atomic\n");
+               set_assert();
        }
 
        if (DBG_ENABLED() || !initialized) {
        }
 
        if (DBG_ENABLED() || !initialized) {
@@ -2003,8 +2004,6 @@ void ModelChecker::build_reads_from_past(ModelAction *curr)
                curr->get_node()->print_may_read_from();
                printf("End printing may_read_from\n");
        }
                curr->get_node()->print_may_read_from();
                printf("End printing may_read_from\n");
        }
-
-       ASSERT(initialized);
 }
 
 bool ModelChecker::sleep_can_read_from(ModelAction * curr, const ModelAction *write) {
 }
 
 bool ModelChecker::sleep_can_read_from(ModelAction * curr, const ModelAction *write) {