From 28067adf4ed506b7e38ddf38e522d5a9621bef92 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Thu, 4 Apr 2013 10:10:32 -0700 Subject: [PATCH] action: include reads-from-promise in HASH calculations And include the *value*, since the same promise index can yield different future values. --- action.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/action.cc b/action.cc index d425b60..34bc09f 100644 --- a/action.cc +++ b/action.cc @@ -630,8 +630,13 @@ unsigned int ModelAction::hash() const hash ^= seq_number << 5; hash ^= id_to_int(tid) << 6; - if (is_read() && reads_from) - hash ^= reads_from->get_seq_number(); + if (is_read()) { + if (reads_from) + hash ^= reads_from->get_seq_number(); + else if (reads_from_promise) + hash ^= model->get_promise_number(reads_from_promise); + hash ^= get_reads_from_value(); + } return hash; } -- 2.34.1