[MOAB-dev] r3207 - MOAB/trunk/parallel

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Thu Oct 15 22:42:13 CDT 2009


Author: kraftche
Date: 2009-10-15 22:42:13 -0500 (Thu, 15 Oct 2009)
New Revision: 3207

Modified:
   MOAB/trunk/parallel/MBParallelComm.cpp
Log:
fix incorrect buffer size from pack_buffer causing segfaults for read with BCAST_DELETE

Modified: MOAB/trunk/parallel/MBParallelComm.cpp
===================================================================
--- MOAB/trunk/parallel/MBParallelComm.cpp	2009-10-16 03:38:41 UTC (rev 3206)
+++ MOAB/trunk/parallel/MBParallelComm.cpp	2009-10-16 03:42:13 UTC (rev 3207)
@@ -665,12 +665,9 @@
 
   MBRange::const_iterator rit;
 
-    // get an estimate of the buffer size
-  buff_size = estimate_ents_buffer_size(orig_ents, store_remote_handles);
-  buff.clear();
-  buff.reserve(1);
+    // get initial buffer ptr
+  buff.resize(1);
   unsigned char *buff_ptr = &buff[0];
-  CHECK_BUFF_SPACE(buff, buff_ptr, buff_size);
   
     // entities
   result = pack_entities(orig_ents, buff, buff_ptr,
@@ -692,6 +689,7 @@
     RRA("Packing tags (count) failed.");
   }
 
+  buff_size = buff_ptr - &buff[0];
   return result;
 }
  



More information about the moab-dev mailing list