Changeset 2192 for trunk/Cbc


Ignore:
Timestamp:
May 29, 2015 8:54:35 AM (4 years ago)
Author:
stefan
Message:

workaround invalid read issue with whichGenerator_

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/src/CbcModel.cpp

    r2190 r2192  
    73187318            assert (currentNumberCuts + numberRowsAtContinuous_ <= lastws->getNumArtificial());
    73197319            assert (currentNumberCuts <= maximumWhich_); // we will read from whichGenerator_[0..currentNumberCuts-1] below, so should have all these entries
     7320            // the above assert fails in certain situations, which indicates a bug in the code below
     7321            // as a workaround, resize whichGenerator_ to make sure we can read all entries without an invalid read from valgrind (and subsequent crash somewhere, seems so)
     7322            resizeWhichGenerator(maximumWhich_, currentNumberCuts);
    73207323            for (i = 0; i < currentNumberCuts; i++) {
    73217324                CoinWarmStartBasis::Status status =
Note: See TracChangeset for help on using the changeset viewer.