Hello !

Looking through the code and changing "glp_double" by "glp_long_double" in my GLPK fork I found an unitialized variable in npp_reduce_ineq_coef in "src/npp/npp4.c":

====

int npp_reduce_ineq_coef(NPP *npp, NPPROW *row)
{     /* reduce inequality constraint coefficients */
      NPPROW *copy;
      NPPAIJ *aij;
      struct elem *ptr, *e;
      int kase, count[2];
      glp_double b;  //***********!!!!!!!!! here not initialized
      /* the row must be inequality constraint */
      xassert(row->lb < row->ub);
      count[0] = count[1] = 0;
      for (kase = 0; kase <= 1; kase++)
      {  if (kase == 0)
         {  /* process row lower bound */
            if (row->lb == -GLP_DBL_MAX) continue;
#ifdef GLP_DEBUG
            xprintf("L");
#endif
            ptr = copy_form(npp, row, +1.0);
            b = + row->lb; ////****!!!!!! if it enter here when kase == 0 then we are using "b" uninitialized
         }

====

Cheers !


Reply via email to