Hello Steven,

in bobyqa/bobyqa.c malloc is called without checking the result, which may be NULL.

3103     xs = (double *) malloc(sizeof(double) * (U(n)));
3104
3105     sxl = nlopt_new_rescaled(U(n), s, xl);
3106     if (!sxl) { ret = NLOPT_OUT_OF_MEMORY; goto done; }
3107     xl = sxl;
3108     sxu = nlopt_new_rescaled(U(n), s, xu);
3109     if (!sxu) { ret = NLOPT_OUT_OF_MEMORY; goto done; }
3110     xu = sxu;
3111     nlopt_reorder_bounds(n, sxl, sxu);
3112
3113 rhobeg = fabs(dx[0] / s[0]); /* equals all other dx[i] after rescaling */
3114
3115     calfun_data.s = s;
3116     calfun_data.xs = xs;

Best regards

Heinrich Schuchardt

_______________________________________________
NLopt-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss

Reply via email to