action: bugfix - use non-zero fence "location"
[model-checker.git] / execution.cc
index 8b507718ee2d3579b7bab555d7c424b6d2a4083b..17ea954a65570160ffccd1a42f247c95956b8fa2 100644 (file)
@@ -2215,8 +2215,8 @@ ModelAction * ModelExecution::get_last_seq_cst_write(ModelAction *curr) const
  */
 ModelAction * ModelExecution::get_last_seq_cst_fence(thread_id_t tid, const ModelAction *before_fence) const
 {
-       /* All fences should have NULL location */
-       action_list_t *list = get_safe_ptr_action(obj_map, NULL);
+       /* All fences should have location FENCE_LOCATION */
+       action_list_t *list = get_safe_ptr_action(obj_map, FENCE_LOCATION);
        action_list_t::reverse_iterator rit = list->rbegin();
 
        if (before_fence) {