Summary
Create some unit tests for bitmap manipulation in the block manager, in particular create tests for the function __ckpt_add_blkmod_entry() in block/block_ckpt.c. This function had a significant bug in it, now fixed by WT-6366.
WT-6366 was an off-by-one error in some bitmap manipulation that caused memory corruption leading to crashes in the field.
The background is that we implement incremental backups by keeping bitmaps to track the parts of a file that have changed since the last backup. These bitmaps start at 128 bits and grow as needed if the file is large enough. The bug in that ticket was that when we needed to set the bit one past the current bitmap size we failed to allocate more memory. So we set a bit on some piece of memory that didn't belong to us.
The code is a bit tricky because the bitmap is tracking allocations in one block size but the input (what has changed and needs to be added to the bitmap) is tracked in a different block size. So between the block size conversions and bits per byte conversions we missed an edge case.
Acceptance Criteria (Definition of Done)
The goal of this ticket is to create a unit test that, if the off-by-one error (from WT-6366) were re-introduced, the unit test would find it.