Quellcode durchsuchen

mpi/src/starpu_mpi_coop_sends.c: do not use req as it may be freed before returning

Nathalie Furmento vor 4 Jahren
Ursprung
Commit
72feb88eca
1 geänderte Dateien mit 3 neuen und 2 gelöschten Zeilen
  1. 3 2
      mpi/src/starpu_mpi_coop_sends.c

+ 3 - 2
mpi/src/starpu_mpi_coop_sends.c

@@ -268,8 +268,9 @@ void _starpu_mpi_coop_send(starpu_data_handle_t data_handle, struct _starpu_mpi_
 	if (first)
 	{
 		/* We were first, we are responsible for acquiring the data for everybody */
-		starpu_data_acquire_on_node_cb_sequential_consistency_sync_jobids(req->data_handle, STARPU_MAIN_RAM, mode, _starpu_mpi_coop_sends_data_ready, coop_sends, sequential_consistency, 0, &req->pre_sync_jobid, NULL);
-		coop_sends->pre_sync_jobid = req->pre_sync_jobid;
+		long pre_sync_jobid;
+		starpu_data_acquire_on_node_cb_sequential_consistency_sync_jobids(req->data_handle, STARPU_MAIN_RAM, mode, _starpu_mpi_coop_sends_data_ready, coop_sends, sequential_consistency, 0, &pre_sync_jobid, NULL);
+		coop_sends->pre_sync_jobid = pre_sync_jobid;
 	}
 	else
 		req->pre_sync_jobid = coop_sends->pre_sync_jobid;