From: Brian Norris Date: Sat, 2 Mar 2013 23:03:58 +0000 (-0800) Subject: model: bugfix - adding a Promise reader can cause failure X-Git-Tag: oopsla2013~175 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=443fd91df4ad9b88d5ec88a29f80008911b4a917;p=model-checker.git model: bugfix - adding a Promise reader can cause failure --- diff --git a/model.cc b/model.cc index aba7177..38d08d9 100644 --- a/model.cc +++ b/model.cc @@ -882,7 +882,8 @@ bool ModelChecker::process_read(ModelAction *curr) } case READ_FROM_PROMISE: { Promise *promise = curr->get_node()->get_read_from_promise(); - promise->add_reader(curr); + if (promise->add_reader(curr)) + priv->failed_promise = true; value = promise->get_value(); curr->set_read_from_promise(promise); mo_graph->startChanges();