Merge pull request #5878 from mjjbell/mbell/fix_windows_partition
Fix bit-shift overflow in MLD partition step for Windows builds
This commit is contained in:
commit
21444ce7cb
@ -2,6 +2,9 @@
|
|||||||
- Changes from 5.23.0
|
- Changes from 5.23.0
|
||||||
- Infrastructure
|
- Infrastructure
|
||||||
- CHANGED: Bundled protozero updated to v1.7.0. [#5858](https://github.com/Project-OSRM/osrm-backend/pull/5858)
|
- CHANGED: Bundled protozero updated to v1.7.0. [#5858](https://github.com/Project-OSRM/osrm-backend/pull/5858)
|
||||||
|
- Windows:
|
||||||
|
- FIXED: Fix bit-shift overflow in MLD partition step. [#5878](https://github.com/Project-OSRM/osrm-backend/pull/5878)
|
||||||
|
|
||||||
|
|
||||||
# 5.23.0
|
# 5.23.0
|
||||||
- Changes from 5.22.0
|
- Changes from 5.22.0
|
||||||
|
@ -212,10 +212,10 @@ template <storage::Ownership Ownership> class MultiLevelPartitionImpl final
|
|||||||
// create mask that has `bits` ones at its LSBs.
|
// create mask that has `bits` ones at its LSBs.
|
||||||
// 000011
|
// 000011
|
||||||
BOOST_ASSERT(offset < NUM_PARTITION_BITS);
|
BOOST_ASSERT(offset < NUM_PARTITION_BITS);
|
||||||
PartitionID mask = (1UL << offset) - 1UL;
|
PartitionID mask = (1ULL << offset) - 1ULL;
|
||||||
// 001111
|
// 001111
|
||||||
BOOST_ASSERT(next_offset < NUM_PARTITION_BITS);
|
BOOST_ASSERT(next_offset < NUM_PARTITION_BITS);
|
||||||
PartitionID next_mask = (1UL << next_offset) - 1UL;
|
PartitionID next_mask = (1ULL << next_offset) - 1ULL;
|
||||||
// 001100
|
// 001100
|
||||||
masks[lidx++] = next_mask ^ mask;
|
masks[lidx++] = next_mask ^ mask;
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user