[Cbc] integer overflow in CglGomory.cpp

Tobias Stengel Tobias.Stengel at locom.de
Tue May 16 05:47:45 EDT 2017


Hi,

I noticed an integer overflow in CglGomory.cpp / nearestRational(double, int) lines 445 and 446. That specific MIP is solved correctly, but I have no idea whether such an overflow can lead to wrong cuts that e.g. cut off the optimal solution. Anyway integer overflow is undefined behaviour in C/C++ and the returned fractional is not "near" the input...

2 parameter sets for nearestRational that lead to overflow can be found in the attached test program. Does anyone know how nearestRational works and how the overflow can be fixed properly?

Thanks

Tobias



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20170516/46f20a32/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fractional_test.cpp
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20170516/46f20a32/attachment.ksh>


More information about the Cbc mailing list