Skip to content

Commit 440fb61

Browse files
committed
Merge branch 'master' into 5.23
2 parents 2222ee6 + f87a324 commit 440fb61

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
- FIXED: treat `bicycle=use_sidepath` as no access on the tagged way. [#5622](https://github.com/Project-OSRM/osrm-backend/pull/5622)
1717
- FIXED: fix table result when source and destination on same one-way segment. [#5828](https://github.com/Project-OSRM/osrm-backend/pull/5828)
1818
- FIXED: fix occasional segfault when swapping data with osrm-datastore and using `exclude=` [#5844](https://github.com/Project-OSRM/osrm-backend/pull/5844)
19+
- FIXED: fix crash in MLD alternative search if source or target are invalid [#5851](https://github.com/Project-OSRM/osrm-backend/pull/5851)
1920
- Misc:
2021
- CHANGED: Reduce memory usage for raster source handling. [#5572](https://github.com/Project-OSRM/osrm-backend/pull/5572)
2122
- CHANGED: Add cmake option `ENABLE_DEBUG_LOGGING` to control whether output debug logging. [#3427](https://github.com/Project-OSRM/osrm-backend/issues/3427)

features/testbot/zero-speed-updates.feature

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,31 @@ Feature: Check zero speed updates
9393
| 1 | 2 | NoRoute |
9494

9595

96+
Scenario: Routing with alternatives on restricted way
97+
Given the node map
98+
"""
99+
a-1-b-2-c
100+
"""
101+
102+
And the ways
103+
| nodes | oneway |
104+
| abc | no |
105+
And the contract extra arguments "--segment-speed-file {speeds_file}"
106+
And the customize extra arguments "--segment-speed-file {speeds_file}"
107+
And the speed file
108+
"""
109+
1,2,0
110+
2,1,0
111+
"""
112+
And the query options
113+
| alternatives | true |
114+
115+
116+
When I route I should get
117+
| from | to | code | alternative |
118+
| 1 | 2 | NoRoute | |
119+
120+
96121
Scenario: Routing on restricted oneway
97122
Given the node map
98123
"""

src/engine/routing_algorithms/alternative_path_mld.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,10 @@ makeCandidateVias(SearchEngineData<Algorithm> &search_engine_data,
663663
Heap &reverse_heap = *search_engine_data.reverse_heap_1;
664664

665665
insertNodesInHeaps(forward_heap, reverse_heap, phantom_node_pair);
666+
if (forward_heap.Empty() || reverse_heap.Empty())
667+
{
668+
return {};
669+
}
666670

667671
// The single via node in the shortest paths s,via and via,t sub-paths and
668672
// the weight for the shortest path s,t we return and compare alternatives to.

0 commit comments

Comments
 (0)