ソースを参照

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;
 }