Changes are in the trunk

Thanks,

Gaeln
On Aug 8, 2005, at 7:38 AM, Gleb Natapov wrote:

Hello,

Included patch fixes bugs in ompi_free_list in the case ompi_free_list was
created with NULL class and/or mpool parameters.

Index: ompi/class/ompi_free_list.c
===================================================================
--- ompi/class/ompi_free_list.c (revision 6760)
+++ ompi/class/ompi_free_list.c (working copy)
@@ -75,7 +75,7 @@ int ompi_free_list_grow(ompi_free_list_t
     unsigned char* ptr;
     size_t i;
     size_t mod;
-    mca_mpool_base_registration_t* user_out;
+    mca_mpool_base_registration_t* user_out = NULL;

if (flist->fl_max_to_alloc > 0 && flist->fl_num_allocated + num_elements > flist->fl_max_to_alloc)
         return OMPI_ERR_TEMP_OUT_OF_RESOURCE;
@@ -97,7 +97,10 @@ int ompi_free_list_grow(ompi_free_list_t
         item->user_data = user_out;
         if (NULL != flist->fl_elem_class) {
             OBJ_CONSTRUCT_INTERNAL(item, flist->fl_elem_class);
-        }
+        } else {
+           OBJ_CONSTRUCT (&item->super, opal_list_item_t);
+       }
+       
         opal_list_append(&(flist->super), &(item->super));
         ptr += flist->fl_elem_size;
     }
--
                        Gleb.
_______________________________________________
devel mailing list
de...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/devel

Reply via email to