Fix use-after-move bug and optimize graph object passing in min_fill_…#15
Open
khalidDaoud wants to merge 4 commits intokit-algo:masterfrom
Open
Fix use-after-move bug and optimize graph object passing in min_fill_…#15khalidDaoud wants to merge 4 commits intokit-algo:masterfrom
khalidDaoud wants to merge 4 commits intokit-algo:masterfrom
Conversation
…in.h - Fix undefined behavior in `compute_cch_graph_order` where `tail` was accessed after `std::move` due to indeterminate argument evaluation order. - Add missing `std::move` calls to avoid unnecessary deep copies of large graph structures during nested dissection.
- the basic factory's select_source_target_pairs method ignores the GeoPos argument and falls back to random selection, we enabled GeoPos - Use O(N) single-pass linear scan to find geometric extremes instead of sorting, avoiding O(N) memory overhead. - Fixes heap corruption/OOM on planet-scale graphs while maintaining high-quality geometric cuts.
Re-enable the optimization with conservative limit
In min_fill_in.h:300-305, change:
// if (big.size() == 1 && small.size() < 200000) {
to:
if (big.size() == 1 && small.size() < 10000) { // Much smaller to prevent stack overflow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix use-after-move bug and optimize graph object passing in min_fill_in.h
compute_cch_graph_orderwheretailwas accessed afterstd::movedue to indeterminate argument evaluation order.std::movecalls to avoid unnecessary deep copies of large graph structures during nested dissection.