Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix segfault in smpi+tracing with detached sends.
[simgrid.git] / src / smpi / smpi_base.c
index d06a471..e897b2e 100644 (file)
@@ -65,7 +65,8 @@ static MPI_Request build_request(void *buf, int count,
 
 static void smpi_mpi_request_free_voidp(void* request)
 {
-  smpi_mpi_request_free(request);
+  MPI_Request req = request;
+  smpi_mpi_request_free(&req);
 }
 
 /* MPI Low level calls */
@@ -126,7 +127,9 @@ void smpi_mpi_start(MPI_Request request)
                                    detached);
 
 #ifdef HAVE_TRACING
-    simcall_set_category (request->action, TRACE_internal_smpi_get_category());
+    /* FIXME: detached sends are not traceable (request->action == NULL) */
+    if (request->action)
+      simcall_set_category(request->action, TRACE_internal_smpi_get_category());
 #endif
   }
 }