From: Brian Norris Date: Sat, 2 Mar 2013 00:45:52 +0000 (-0800) Subject: action: bugfix - reads-from value should be VALUE_NONE for new actions X-Git-Tag: oopsla2013~189 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=68b6b3ecad7edcaed6547d4d2be3eb974dfc98d6;p=model-checker.git action: bugfix - reads-from value should be VALUE_NONE for new actions If a new read action hasn't had a chance to choose a valid reads-from or reads-from-promise, it can have "no" value. This only occurs if we are terminating an infeasible execution, where there were no valid reads to read from. This bug was triggering faults only for verbose printing, were we would print the status of an incomplete read. --- diff --git a/action.cc b/action.cc index 5f83c3f..757b3d1 100644 --- a/action.cc +++ b/action.cc @@ -394,7 +394,9 @@ uint64_t ModelAction::get_reads_from_value() const ASSERT(is_read()); if (reads_from) return reads_from->get_write_value(); - return reads_from_promise->get_value(); + else if (reads_from_promise) + return reads_from_promise->get_value(); + return VALUE_NONE; /* Only for new actions with no reads-from */ } /**