Print this page
11067 debug statistics crash ld(1) when -z allextract

@@ -182,11 +182,11 @@
                 if (DBG_NOTCLASS(DBG_C_STATS))
                         continue;
 
                 arsym = adp->ad_start;
                 aux = adp->ad_aux;
-                while (arsym->as_off) {
+                while ((arsym != NULL) && (arsym->as_off != NULL)) {
                         /*
                          * Assume that symbols from the same member file are
                          * adjacent within the archive symbol table.
                          */
                         if (poffset != arsym->as_off) {

@@ -197,12 +197,11 @@
                         }
                         aux++, arsym++;
                 }
                 if ((count == 0) || (used == 0))
                         continue;
-#ifndef UDIV_NOT_SUPPORTED
+
                 dbg_print(lml, MSG_INTL(MSG_STATS_AR), adp->ad_name, count,
                     used, ((used * 100) / count));
-#endif
         }
         Dbg_util_nl(lml, DBG_NL_STD);
 }