Hello,

after upgrading to NLopt 2.2.1 I had a crash in my code. After a bit
of investigation with valgrind, it seems the problem is in
nlopt_minimize_constrained:

==21376== Thread 2:
==21376== Invalid read of size 8
==21376==    at 0x4C29AA8: memcpy (mc_replace_strmem.c:523)
==21376==    by 0x6D998E1: nlopt_set_xtol_abs (options.c:510)
==21376==    by 0x6D9C59C: nlopt_minimize_econstrained (deprecated.c:122)
==21376==    by 0x6D9C727: nlopt_minimize_constrained (deprecated.c:153)

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?

Cheers and thanks,

 Francesco.

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

Reply via email to