On Dec 7, 2010, at 8:56 AM, Francesco Biscani wrote:
What happens is that in my code I set xtol_abs to NULL (which seems to
be allowed by the C API documentation), but it seems to me NLopt 2.2.1
never checks if the pointer is NULL and performs a memcpy nevertheless
(in options.c:510). Setting xtol_abs to a "real" pointer fixes the
issue for me. Does this sound right?

Thanks, this is a bug; in the next release I'll modify it so that xtol_abs == NULL is equivalent to 0 tolerance in the deprecated API, for backward compatibility. The patch is:

hunk ./api/deprecated.c 122
-     ret = nlopt_set_xtol_abs(opt, xtol_abs);
+     if (xtol_abs) ret = nlopt_set_xtol_abs(opt, xtol_abs);

Steven


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

Reply via email to