model: don't create UNINIT actions for Threads, mutexes, etc.
authorBrian Norris <banorris@uci.edu>
Fri, 7 Dec 2012 06:57:02 +0000 (22:57 -0800)
committerBrian Norris <banorris@uci.edu>
Fri, 7 Dec 2012 06:57:02 +0000 (22:57 -0800)
ModelActions may be associated with fences, mutexes, threads, etc., all
of which never hit the "uninitialized" case. So, we shouldn't create
these UNINIT actions.

model.cc

index 7bff598f974e762daecc27d7d58926bdfa466d68..c38c79caa24b81f04e67d3069de2f32351aa0aac 100644 (file)
--- a/model.cc
+++ b/model.cc
@@ -2105,7 +2105,7 @@ void ModelChecker::add_action_to_lists(ModelAction *act)
        ModelAction *uninit = NULL;
        int uninit_id = -1;
        action_list_t *list = get_safe_ptr_action(obj_map, act->get_location());
-       if (list->empty()) {
+       if (list->empty() && act->is_atomic_var()) {
                uninit = new_uninitialized_action(act->get_location());
                uninit_id = id_to_int(uninit->get_tid());
                list->push_back(uninit);