Fix typo
[c11tester.git] / history.cc
index 32aacf70358114c8a1bedfbdf38b80ee37c1833b..90951ab7bc30fca27e121992f7008722b6b5a46c 100644 (file)
@@ -181,7 +181,14 @@ void ModelHistory::process_action(ModelAction *act, thread_id_t tid)
                return;
 
        /* Add to curr_inst_list */
-       act->setFuncActRef(curr_act_list->add_back(act));
+       curr_act_list->push_back(act);
+
+       // Increment ref count for every action and reads_froms
+       act->incr_func_ref_count();
+       if (act->is_read()) {
+               ModelAction * rf = act->get_reads_from();
+               rf->incr_func_ref_count();
+       }
 
        FuncNode * func_node = func_nodes[func_id];
        func_node->add_inst(act);