[CoinUtils-tickets] [COIN-OR Common Utilities] #82: Inconsistency in counting, leading to segmentation fault
COIN-OR Common Utilities
coin-trac at coin-or.org
Mon Jan 6 04:34:02 EST 2014
#82: Inconsistency in counting, leading to segmentation fault
---------------------------+-----------------
Reporter: baeklund1 | Owner:
Type: defect | Status: new
Priority: major | Version: trunk
Keywords: CoinSearchTree |
---------------------------+-----------------
In version 2.9.11 there is an error in the CoinSearchTree.hpp file.
Class: CoinSearchTreeBase
Function
inline void push(const CoinTreeSiblings& sib,
const bool incrInserted = true)
Bug: There is inconsistence in how the class uses the size_ variable. The
class works when all CoinTreeSiblings which are pushed into the class have
not been processed before such that all siblings need to be processed. But
if some of the siblings have been processed before the size_ parameter
does not correspond to the number of unprocessed siblings. This can later
give the problem that size_ is > 0 but the empty() function returns true,
and when the bcp code calls the top() function it gives a segmentation
fault, since size >0 but candidateList is empty.
Fix: If size_ should correspond to the number of unprocessed sibling; line
288 should be replaced by:
size_ += sib.toProcess();
If size should represent something else then more code should be
rewritten.
--
Ticket URL: <https://projects.coin-or.org/CoinUtils/ticket/82>
COIN-OR Common Utilities <http://projects.coin-or.org/CoinUtils>
Common data structures and linear algebra functions for COIN-OR projects
More information about the CoinUtils-tickets
mailing list