X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=model.cc;h=7bff598f974e762daecc27d7d58926bdfa466d68;hb=67cae4edb16c1c432b26bedcc9e19dae6dc37b1b;hp=1499d12aa3a9a6c8c24c9838602c23f532c86140;hpb=ea16f9a5121a4e58881a88c0d29fca9138e72464;p=model-checker.git diff --git a/model.cc b/model.cc index 1499d12..7bff598 100644 --- a/model.cc +++ b/model.cc @@ -2510,7 +2510,10 @@ void ModelChecker::build_reads_from_past(ModelAction *curr) } bool ModelChecker::sleep_can_read_from(ModelAction * curr, const ModelAction *write) { - while(true) { + while (true) { + /* UNINIT actions don't have a Node, and they never sleep */ + if (write->is_uninitialized()) + return true; Node *prevnode=write->get_node()->get_parent(); bool thread_sleep=prevnode->enabled_status(curr->get_tid())==THREAD_SLEEP_SET;