Skip to content

Commit 21444ce

Browse files
authored
Merge pull request #5878 from mjjbell/mbell/fix_windows_partition
Fix bit-shift overflow in MLD partition step for Windows builds
2 parents 1ba8aba + b840c0b commit 21444ce

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
- Changes from 5.23.0
33
- Infrastructure
44
- CHANGED: Bundled protozero updated to v1.7.0. [#5858](https://github.com/Project-OSRM/osrm-backend/pull/5858)
5+
- Windows:
6+
- FIXED: Fix bit-shift overflow in MLD partition step. [#5878](https://github.com/Project-OSRM/osrm-backend/pull/5878)
7+
58

69
# 5.23.0
710
- Changes from 5.22.0

include/partitioner/multi_level_partition.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,10 @@ template <storage::Ownership Ownership> class MultiLevelPartitionImpl final
212212
// create mask that has `bits` ones at its LSBs.
213213
// 000011
214214
BOOST_ASSERT(offset < NUM_PARTITION_BITS);
215-
PartitionID mask = (1UL << offset) - 1UL;
215+
PartitionID mask = (1ULL << offset) - 1ULL;
216216
// 001111
217217
BOOST_ASSERT(next_offset < NUM_PARTITION_BITS);
218-
PartitionID next_mask = (1UL << next_offset) - 1UL;
218+
PartitionID next_mask = (1ULL << next_offset) - 1ULL;
219219
// 001100
220220
masks[lidx++] = next_mask ^ mask;
221221
});

0 commit comments

Comments
 (0)