Skip to content

Out-of-bounds access in HighsSymmetryDetection::partitionRefinement #3166

Description

@falk-hueffner

The following model crashes on Linux x86-64 and also MacOS arm64:

highs_crashmodel.mps.gz

It acrashes with default options but also deterministically (highs --parallel off --threads 1 highs_crashmodel.mps). I was unable to meaningfully reduce the size of the crashing instance, looks like a fairly specific path is needed.

ASAN nails it down to an out-of-bounds access: at HighsSymmetry.cpp around line 912 we have cellEnd < cellStart which makes std::partition fault.

It seems that the pruning around line 979:

      currentPartitionLinks[firstCellStart] = cellEnd;

      // undo possibly incomplete changes done to the cells
      for (--i; i >= refineStart; --i)
        updateCellMembership(i, firstCellStart, false);

causes this to become corrupt. I tried to remove that and rely on them be removed by backtracking of the caller together with all other cells created for this node, and that fixes the issue.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions