Skip to content

[Backport] EnsureLargeEnoughWave: Fix it when requesting powers of two#2605

Merged
t-b merged 2 commits intorelease/2.9from
bugfix/2605-ensure-large-enough-wave-backport
Jan 22, 2026
Merged

[Backport] EnsureLargeEnoughWave: Fix it when requesting powers of two#2605
t-b merged 2 commits intorelease/2.9from
bugfix/2605-ensure-large-enough-wave-backport

Conversation

@t-b
Copy link
Collaborator

@t-b t-b commented Jan 21, 2026

Will merge once CI passes.

t-b added 2 commits January 21, 2026 17:06
max is a function with up to 100 optional arguments so let's use this.
When we request a power of two index which is larger than double the
wave size and MINIMUM_WAVE_SIZE we would calculate an indexShouldExist
which is exactly the same as the requested value.

So let's add one before finding the next power of two.

Bug introduced in 602d37c (EnsureLargeEnoughWave: Avoid resizing when not needed, 2025-04-16).
@t-b t-b changed the title [Backport] EnsureLargeEnoughWave: Fix it when requesting powers of two #2604 [Backport] EnsureLargeEnoughWave: Fix it when requesting powers of two Jan 21, 2026
@t-b t-b self-assigned this Jan 21, 2026
@t-b t-b merged commit 81ba236 into release/2.9 Jan 22, 2026
19 checks passed
@t-b t-b deleted the bugfix/2605-ensure-large-enough-wave-backport branch January 22, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments