From: Brian Norris Date: Fri, 7 Dec 2012 06:57:02 +0000 (-0800) Subject: model: don't create UNINIT actions for Threads, mutexes, etc. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cd32776770fd546ecfe34e9238d0e2d5187a1106;p=c11tester.git model: don't create UNINIT actions for Threads, mutexes, etc. 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. --- diff --git a/model.cc b/model.cc index 7bff598f..c38c79ca 100644 --- 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);