You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the code below is compiled and run with valgrind the following is reported:
==314955== Conditional jump or move depends on uninitialised value(s)
==314955== at 0x49FA7C1: CbcModel::setBestSolution(CBC_Message, double&, double const*, int) (CbcModel.cpp:14302)
==314955== by 0x4A64F66: CbcMain1(std::deque<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, CbcModel&, CbcParameters&, int (*)(CbcModel*, int), ampl_info*) (CbcSolver.cpp:6700)
==314955== by 0x4A8B516: CbcMain1(int, char const**, CbcModel&, CbcParameters&, int (*)(CbcModel*, int), ampl_info*) (CbcSolver.cpp:13236)
==314955== by 0x10EAC6: main (reproduction2.cpp:65)
==314955==
As far as I can see this is caused by " double obj;" in CbcSolver line 6619 still being uninitialized in line 6700 and then passed to CbcModel::setBestSolution where an if depends on it.
Unable to reproduce as CbcMipStart
gives
Cbc0045I Warning: MIPstart solution is not valid, column names do not match, ignoring it. So code does not follow path which led to undefined obj.
This is a bug arising because there were no integer variables.
I have fixed that. Valgrind does not complain when I run. Changes have been made recently in master which could have fixed problem.
If the code below is compiled and run with valgrind the following is reported:
As far as I can see this is caused by " double obj;" in CbcSolver line 6619 still being uninitialized in line 6700 and then passed to CbcModel::setBestSolution where an if depends on it.
The text was updated successfully, but these errors were encountered: