-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Context
Found during DST methodology review of bitmap implementation (commit e9be18b).
Problems
-
Offset range too narrow: DST generates offsets 0-2047 but never tests near
MAX_BIT_OFFSET(4,294,967,296). Should occasionally test boundary offsets and large allocations (~125KB for offset 1,000,000). -
No explicit read-after-write test: No SETBIT-then-GETBIT sequence on the same key+offset. Relies on random interleaving which is rare at 5% probability.
-
Bitmap in final else clause: Fragile if new string ops are added above — bitmap coverage could silently drop to zero.
Suggested Fix
- 5% of bitmap ops: use
rng.gen_range(0, MAX_BIT_OFFSET + 100)for boundary testing - After each SETBIT, do a verification GETBIT on the same key+offset
- Consider a named constant for the bitmap threshold instead of relying on
else
Severity
Low — coverage gap, not a correctness bug.
Found By
DST review agent (Issues 3, 5, 6)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels