[Coin-discuss] 2 error + 1 ,may be, recommended correction
John J Forrest
jjforre at us.ibm.com
Thu Mar 11 10:09:54 EST 2004
Sandor,
I can not duplicate the error. When you say buffer overflow do you mean a
segmentation fault or a memory checker report of an error?
I downloaded a clean copy of clp and added lots of asserts and was running
electricfence but got no errors.
Using -g
RedHat 9.0 Pentium 4
gcc 3.2.2
The sizes should be number of rows for dual and number of rows+columns for
primal. An overflow would be an error. The idea is that on large
problems the infeasibilities (primal or dual) change slowly so that it is
worth keeping a list and updating it (especially as we need square of
infeasibility for steepest edge algorithms). If a variable was infeasible
and goes feasible then the infeasibility value is not set to zero (as then
we might add it back again and then we could get overflow) but to
1.0e-100.
Any further information would be helpful - maybe just to me and not posted
for discussion.
John Forrest
sandor szedmak <ss03v at ecs.soton.ac.uk>
Sent by: coin-discuss-admin at www-124.southbury.usf.ibm.com
03/11/2004 06:15 AM
Please respond to
coin-discuss
To
coin-discuss at www-124.southbury.usf.ibm.com
cc
Subject
[Coin-discuss] 2 error + 1 ,may be, recommended correction
Hi,
I just started to use Clp from COIN.
I found two buffer overflow errors:
---------------------------------------------------
1.
In the file:
ClpDualRowSteepest.cpp
the buffer infeasible_ goes beyond its capacity.
The error can be produced by
clp -unitTest
using the file
finnis.mps
A possible correction can be
infeasible_ = new CoinIndexedVector();
infeasible_->reserve(max(numberRows,numberColumns));
or
infeasible_ = new CoinIndexedVector();
infeasible_->reserve(numberRows+numberColumns);
in the function
ClpDualRowSteepest::saveWeights(ClpSimplex * model,int mode)
The original version is
infeasible_ = new CoinIndexedVector();
infeasible_->reserve(numberRows);
--------------------------------------------------
2.
In the file
ClpPrimalColumnSteepest.cpp
the buffer infeasible_ does the same that is in ClpDualRowSteepest.cpp.
The error can be produced by
clp -unitTest
using the file
brandy.mps
Here the correction that was suggested previously has been made already.
( to increase the size of infeasible_ by use of
infeasible_->reserve(numberRows+numberColumns); )
It happens in the function
ClpPrimalColumnSteepest::pivotColumn(CoinIndexedVector * updates,
CoinIndexedVector * spareRow1,
CoinIndexedVector * spareRow2,
CoinIndexedVector * spareColumn1,
CoinIndexedVector * spareColumn2)
To change "quickAdd" to "add" does not help on this problem.
Unfortunately I have not found a appropriate correction to this error yet.
-------------------------------------------------
My programming environment:
Suse Linux 8.2(Intel Pentium),
GNU C++ 3.3-23
Coin + Clp was downloaded by cvs on 8/03/2004
------------------------------------------------
Best regards
Sandor Szedmak
Electronics and Computer Science
University of Southampton
United Kingdom
_______________________________________________
Coin-discuss mailing list
Coin-discuss at www-124.ibm.com
http://www-124.ibm.com/developerworks/oss/mailman/listinfo/coin-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/coin-discuss/attachments/20040311/fcc5b511/attachment.html>
More information about the Coin-discuss
mailing list