Skip to content

Undefined behaviour in MLD alternatives #4691

@oxidase

Description

@oxidase

In alternativePathSearch method weighted_packed_paths is have empty paths if the middle node is also the starting node, so in debug mode there is an assertion and ub in release mode.

The issue can be reproduced with the OSM export https://www.openstreetmap.org/export#map=15/56.9103/14.5320, updated weights from crash.txt file and query curl 'http://localhost:5000/route/v1/driving/14.5303422%2C56.9087067%3B14.52962589263916%2C56.90761947631836.json?geometries=polyline&alternatives=true&steps=true&overview=full&annotations=true'

Values in the file are weights but not rates, so to reproduce the issue the line

const auto weight = distance_in_meters / rate;

must be changed to

        const auto weight = rate;

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions