mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
Adjust the mask calculation in case the last range is merged with the previous one, as then the mask must be calculated from the previous range, which the current one has been merged into. Instead of fixing the off-by-one in place, move the calculation of the bit change mask to the next loop, after the ranges have been merged. This simplifies the logic by consolidating mask calculation in a single place, possibly making it less error prone in the future. Also add a test case that triggers the bug being fixed by this commit. Fixes:c5c45bcbd6("pdx: introduce a new compression algorithm based on region offsets") Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com> master commit:edf942201dmaster date: 2026-06-09 11:43:24 +0200