Closed nwf-msr closed 2 months ago
You OK to merge even though macos CI is still pending?
You OK to merge even though macos CI is still pending?
Yeah. I think Mac os 11 support has been removed. I think we need to remove and possibly add the next version
Buddy
ranges can be instantiated withMAX_SIZE_BITS == MIN_SIZE_BITS
(or, in principle,<=
). If this happens, the resulting class will contain 0-length arrays, and code that appears to attempt to access an element therein trips gcc's-Warray-bounds
.This PR contains two commits: one that adds a
static_assert
to ensure thatBuddy
's arrays are always of positive size, and one possible way to fix the case I'm tripping over. The latter works because the Buddy'sMIN_SIZE_BITS
is instantiated atMIN_CHUNK_BITS
, and so the change herein then ensures that itsMAX_SIZE_BITS
is strictly greater thanMIN_CHUNK_BITS
.A different, and possibly better, solution would be to drop the
LargeBuddyRange
fromCentralMetaRange
whenmax_page_chunk_size_bits
is computed to be equal toMIN_CHUNK_BITS
.Please advise.