소스 검색

Avoid reading task field after pushing it

Samuel Thibault 4 년 전
부모
커밋
c8128364af
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/sched_policies/component_sched.c

+ 2 - 1
src/sched_policies/component_sched.c

@@ -370,9 +370,10 @@ int starpu_sched_tree_push_task(struct starpu_task * task)
 int starpu_sched_component_push_task(struct starpu_sched_component *from STARPU_ATTRIBUTE_UNUSED, struct starpu_sched_component *to, struct starpu_task *task)
 {
 	int pushback;
+	int priority = task->priority;
 	pushback = to->push_task(to, task);
 	if (!pushback)
-		_STARPU_TRACE_SCHED_COMPONENT_PUSH(from, to, task, task->priority);
+		_STARPU_TRACE_SCHED_COMPONENT_PUSH(from, to, task, priority);
 	return pushback;
 }