Hello!

In btl_udapl_proc.c, if peer_proc->proc_addr_count <= 0, btl_addr_string will 
not be initialised. Attached is a patch that initialised btl_addr_string at 
the first possible moment, which fixes this problem.

Regards,
Dennis Schridde
--- openmpi-1.4/ompi/mca/btl/udapl/btl_udapl_proc.c.orig	2009-12-08 21:36:23.000000000 +0100
+++ openmpi-1.4/ompi/mca/btl/udapl/btl_udapl_proc.c	2010-01-07 12:38:15.000000000 +0100
@@ -196,6 +196,14 @@
     /* use generic address to find address family */
     saddr = (struct sockaddr *)&(udapl_btl->udapl_addr.addr);
 
+    if (VERBOSE_INFORM <=
+        mca_btl_udapl_component.udapl_verbosity) {
+
+        /*  retrieve udapl btl address string for reporting */
+        inet_ntop(AF_INET, (void *) &btl_addr->sin_addr,
+            btl_addr_string, INET_ADDRSTRLEN);
+    }
+
     if (saddr->sa_family == AF_INET) {
 
         btl_addr = (struct sockaddr_in *)saddr;
@@ -214,9 +222,7 @@
             if (VERBOSE_INFORM <=
                 mca_btl_udapl_component.udapl_verbosity) {
 
-                /*  retrieve udapl btl and peer address string for reporting */
-                inet_ntop(AF_INET, (void *) &btl_addr->sin_addr,
-                    btl_addr_string, INET_ADDRSTRLEN);
+                /*  retrieve peer address string for reporting */
                 inet_ntop(AF_INET, (void *) &peer_addr->sin_addr,
                     peer_addr_string, INET_ADDRSTRLEN);
             }

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to