Skip to content

fix: [Bug Report] osrm-routed segfaults/asserts#7412

Merged
DennisOSRM merged 5 commits intomasterfrom
fix/osrm-routed-segfaults-asserts
Mar 20, 2026
Merged

fix: [Bug Report] osrm-routed segfaults/asserts#7412
DennisOSRM merged 5 commits intomasterfrom
fix/osrm-routed-segfaults-asserts

Conversation

@DennisOSRM
Copy link
Collaborator

@DennisOSRM DennisOSRM commented Mar 13, 2026

Fixes #7203

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

DennisOSRM and others added 2 commits March 13, 2026 12:05
Issue: #7203

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@DennisOSRM DennisOSRM marked this pull request as ready for review March 13, 2026 11:59
@DennisOSRM DennisOSRM requested a review from Copilot March 20, 2026 08:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes an MLD heap update edge case that could touch previously removed nodes, leading to osrm-routed asserts/segfaults (#7203).

Changes:

  • Prevent insertOrUpdate from updating a heap node when that node has been marked as removed.
  • Add a unit test covering the “removed node should not be updated” scenario.
  • Document the fix in CHANGELOG.md.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
unit_tests/engine/offline_facade.cpp Adds a regression unit test verifying removed heap nodes are not updated by insertOrUpdate.
include/engine/routing_algorithms/routing_base_mld.hpp Updates insertOrUpdate logic to skip updates for nodes marked removed.
CHANGELOG.md Adds an unreleased changelog entry describing the crash fix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

DennisOSRM and others added 2 commits March 20, 2026 11:44
…e requirement

The insertOrUpdate function was calling heap.WasRemoved(node), which added
an implicit requirement on the Heap template parameter that could produce
hard-to-decipher errors for Heap types that don't implement WasRemoved.

Instead, add a WasRemoved() method directly to HeapNode (which, as a nested
struct of QueryHeap, can access the private HeapContainer::INVALID_HANDLE),
and call heapNode->WasRemoved() in insertOrUpdate. This keeps the removed-
state check self-contained in the node and removes the extra constraint from
the Heap template parameter.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@DennisOSRM DennisOSRM merged commit b233044 into master Mar 20, 2026
23 checks passed
@DennisOSRM DennisOSRM deleted the fix/osrm-routed-segfaults-asserts branch March 20, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

osrm-routed segfaults/asserts

2 participants