[mpich2-commits] r7941 - mpich2/trunk/src/pm/hydra/include

balaji at mcs.anl.gov balaji at mcs.anl.gov
Fri Feb 11 17:34:22 CST 2011


Author: balaji
Date: 2011-02-11 17:34:21 -0600 (Fri, 11 Feb 2011)
New Revision: 7941

Modified:
   mpich2/trunk/src/pm/hydra/include/hydra.h
Log:
Added an assertion to make sure we never malloc 0 bytes. Thanks to
Kitrick Sheets @ NCSA for reporting the bug.

No reviewer.

Modified: mpich2/trunk/src/pm/hydra/include/hydra.h
===================================================================
--- mpich2/trunk/src/pm/hydra/include/hydra.h	2011-02-11 23:34:19 UTC (rev 7940)
+++ mpich2/trunk/src/pm/hydra/include/hydra.h	2011-02-11 23:34:21 UTC (rev 7941)
@@ -553,6 +553,7 @@
 
 #define HYDU_MALLOC(p, type, size, status)                              \
     {                                                                   \
+        HYDU_ASSERT(size, status);                                      \
         (p) = (type) HYDU_malloc((size));                               \
         if ((p) == NULL)                                                \
             HYDU_ERR_SETANDJUMP((status), HYD_NO_MEM,                   \



More information about the mpich2-commits mailing list