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

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/sgs/liblddbg/common/statistics.c
          +++ new/usr/src/cmd/sgs/liblddbg/common/statistics.c
↓ open down ↓ 176 lines elided ↑ open up ↑
 177  177                  if ((adp->ad_flags & FLG_ARD_EXTRACT) == 0) {
 178  178                          Dbg_unused_file(lml, adp->ad_name, 0, 0);
 179  179                          continue;
 180  180                  }
 181  181  
 182  182                  if (DBG_NOTCLASS(DBG_C_STATS))
 183  183                          continue;
 184  184  
 185  185                  arsym = adp->ad_start;
 186  186                  aux = adp->ad_aux;
 187      -                while (arsym->as_off) {
      187 +                while ((arsym != NULL) && (arsym->as_off != NULL)) {
 188  188                          /*
 189  189                           * Assume that symbols from the same member file are
 190  190                           * adjacent within the archive symbol table.
 191  191                           */
 192  192                          if (poffset != arsym->as_off) {
 193  193                                  count++;
 194  194                                  poffset = arsym->as_off;
 195  195                                  if (aux->au_mem == FLG_ARMEM_PROC)
 196  196                                          used++;
 197  197                          }
 198  198                          aux++, arsym++;
 199  199                  }
 200  200                  if ((count == 0) || (used == 0))
 201  201                          continue;
 202      -#ifndef UDIV_NOT_SUPPORTED
      202 +
 203  203                  dbg_print(lml, MSG_INTL(MSG_STATS_AR), adp->ad_name, count,
 204  204                      used, ((used * 100) / count));
 205      -#endif
 206  205          }
 207  206          Dbg_util_nl(lml, DBG_NL_STD);
 208  207  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX