Repository navigation
Harden cc_heap removal, duplicates, and growth - #725
Merged
Merged
Conversation
24 of 37 tasks
Dikluwe
marked this pull request as draft
September 24, 2026 03:54
Dikluwe
force-pushed
the
fix/cc-heap-edge-cases
branch
from
September 24, 2026 14:01
f0897df to
8023945
Compare
Dikluwe
marked this pull request as ready for review
September 24, 2026 14:06
Dikluwe
force-pushed
the
fix/cc-heap-edge-cases
branch
from
September 24, 2026 15:53
1c549e1 to
cad168c
Compare
Member
|
Thanks for your work, much appreciated! |
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.
Summary
cc_heap_update()FALSEwithout mutation when remove/update support is disabledSecurity and compatibility
PR #624 fixed the zero-capacity growth bug that could write beyond a zero-byte allocation. This PR preserves that invariant without forbidding the public input: a requested capacity of zero now creates a valid empty heap with an internal capacity of one.
Growth is checked for overflow and uses a temporary allocation result. If allocation fails, existing storage and elements remain intact. Because
cc_heap_add()has no return value, a failed growth attempt is a documented no-op.The scheduler and
SbTesselatorcallers were audited: they use positive initial capacities and enable removal support, so their behavior is unchanged.Regression coverage
The tests cover:
Inventor/C/base/heap.has C during configurationLocal verification
git diff --checkpassedThe branch is consolidated as three focused commits directly on the current
master.