Skip to content

Fix 2866#3139

Merged
Opt-Mucca merged 2 commits into
latestfrom
fix-2866
Jul 10, 2026
Merged

Fix 2866#3139
Opt-Mucca merged 2 commits into
latestfrom
fix-2866

Conversation

@Opt-Mucca

Copy link
Copy Markdown
Collaborator

This fixes the crash from the instance in the comments of #2866

Explanation: While iterating over singletonRows, presolving one of the singletons reduces multiple (probably identical ones) to empty rows. Despite them being reduced singletonRows is not updated (is waiting to be cleared). When the size 0 row is then processed, they are not yet deleted and rowPresolve will be called on them during removeRowSingletons. This will then result in a nested call of removeRowSingletons. This is all fine, until we're back at the original loop, where the counter is at something non-zero, e.g., 2, and the loop is continuing because 2 != 0 (the new size of singletonRows from the nested call.

Fix: I've just changed the != to a <.

@zeddybot I'm assuming you're a bot, and a lot of the information wasn't necessary, but the instance was helpful and the issue was clearly explained.

@Opt-Mucca Opt-Mucca requested a review from fwesselm July 7, 2026 13:58
@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.77778% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 73.19%. Comparing base (dfd5cbf) to head (5075f16).
⚠️ Report is 67 commits behind head on latest.

Files with missing lines Patch % Lines
highs/util/HighsDynamicLibrary.h 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           latest    #3139      +/-   ##
==========================================
+ Coverage   73.15%   73.19%   +0.03%     
==========================================
  Files         430      430              
  Lines      103937   104140     +203     
  Branches    16717    16738      +21     
==========================================
+ Hits        76039    76221     +182     
- Misses      27622    27643      +21     
  Partials      276      276              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fwesselm fwesselm left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Opt-Mucca, thanks for fixing this!

Comment thread highs/presolve/HPresolve.cpp
@Opt-Mucca Opt-Mucca merged commit 834f299 into latest Jul 10, 2026
656 of 669 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants