Skip to content

rts: Fix AdjustorPool bitmap manipulation

Ben Gamari requested to merge wip/T21838 into master

Previously the implementation of bitmap_first_unset assumed that __builtin_clz would accept uint8_t however it apparently rather extends its argument to unsigned int.

To fix this we simply revert to a naive implementation since handling the various corner cases with clz is quite tricky. This should be fine given that AdjustorPool isn't particularly hot. Ideally we would have a single, optimised bitmap implementation in the RTS but I'll leave this for future work.

Fixes #21838 (closed).

Merge request reports