Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
SMPI: add check for buffer size in windows creation (thx MBI)
authorAugustin Degomme <adegomme@users.noreply.github.com>
Sat, 19 Mar 2022 16:37:34 +0000 (17:37 +0100)
committerAugustin Degomme <adegomme@users.noreply.github.com>
Sat, 19 Mar 2022 16:37:34 +0000 (17:37 +0100)
src/smpi/bindings/smpi_pmpi_win.cpp

index c65498e..bfbef3a 100644 (file)
@@ -30,6 +30,7 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi);
 int PMPI_Win_create( void *base, MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, MPI_Win *win){
   int retval = 0;
   CHECK_COMM(5)
+  CHECK_BUFFER(1, base, size, MPI_CHAR)
   CHECK_NEGATIVE(2, MPI_ERR_OTHER, size)
   CHECK_NEGATIVE(3, MPI_ERR_OTHER, disp_unit)
   const SmpiBenchGuard suspend_bench;