Repository navigation
🐛 Guard DD slab allocation sizes against overflow - #2841
Merged
Merged
Conversation
🤖 *AI text below* 🤖 Reject initial slab counts that would wrap the byte size. Check growth using the previous slab's byte size before multiplying, then derive its entry count. Unrepresentable allocations throw std::bad_alloc without changing the allocator API. The regression accepts an overflowing count on main and rejects it with this guard. Existing tests retain growth, reuse and reset coverage. Assisted-by: GPT-6 via Codex
burgholzer
enabled auto-merge (squash)
October 25, 2026 13:50
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
7 of 10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 AI text below 🤖
Description
Reject DD slab sizes that overflow
size_twithstd::bad_allocbefore allocating. The initial allocation checks entry count against the representable byte size. Growth checks the previous slab's byte size before multiplying and derives the new entry count from it.An overflowing initial count previously wrapped to a small allocation and was accepted. The new regression reproduces that defect without allocating a large slab. This is a standalone extraction from the native verifier work and has no verifier dependency.
Validation on Linux:
Hosted CI and human review remain pending. GPT-6 via Codex assisted implementation, validation and this description.
Checklist
If PR contains AI-assisted content:
🤖 *AI text below* 🤖(titles are exempt).