From: Frederic Suter Date: Fri, 17 May 2019 07:11:20 +0000 (+0200) Subject: Merge branch 'master' of https://framagit.org/simgrid/simgrid X-Git-Tag: v3.22.4~122 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/84e824746638f2b4c32c315bcfce655098d4e80b?hp=-c Merge branch 'master' of https://framagit.org/simgrid/simgrid --- 84e824746638f2b4c32c315bcfce655098d4e80b diff --combined src/smpi/internals/smpi_global.cpp index 25cbf6216d,66ebe69144..8710495e1c --- a/src/smpi/internals/smpi_global.cpp +++ b/src/smpi/internals/smpi_global.cpp @@@ -214,7 -214,7 +214,7 @@@ void smpi_comm_copy_buffer_callback(sim XBT_DEBUG("Copying %zu bytes from %p to %p", buff_size, tmpbuff, comm->dst_buff_); memcpy_private(comm->dst_buff_, tmpbuff, private_blocks); - if (comm->detached_) { + if (comm->detached()) { // if this is a detached send, the source buffer was duplicated by SMPI // sender to make the original buffer available to the application ASAP xbt_free(buff); @@@ -507,7 -507,7 +507,7 @@@ static void smpi_copy_file(const std::s #endif // If this point is reached, sendfile() actually is not available. Copy file by hand. const int bufsize = 1024 * 1024 * 4; - char buf[bufsize]; + char* buf = new char[bufsize]; while (int got = read(fdin, buf, bufsize)) { if (got == -1) { xbt_assert(errno == EINTR, "Cannot read from %s", src.c_str()); @@@ -524,6 -524,7 +524,7 @@@ } } } + delete[] buf; close(fdin); close(fdout); }