Skip to content

u3: fix return type in hashtable trim when missing key#995

Merged
pkova merged 1 commit into
developfrom
jb/trim-none
May 8, 2026
Merged

u3: fix return type in hashtable trim when missing key#995
pkova merged 1 commit into
developfrom
jb/trim-none

Conversation

@joemfb
Copy link
Copy Markdown
Collaborator

@joemfb joemfb commented Apr 3, 2026

This PR fixes a bug in hashtable trimming (introduced while refactoring in 98bcfaa). The wrong sentinel value was returned for a missing key in an intermediate node (c3n instead of u3_none), making it appear incorrectly that a value had been trimmed and causing the hashtable entry-count to be wrongly decremented. This was effectively a space leak in the capped-cache variants of our HAMTs (ie, the persistent memoization cache), corrected only by melding.

@joemfb joemfb requested a review from a team as a code owner April 3, 2026 14:59
@pkova pkova merged commit d25cb6d into develop May 8, 2026
2 checks passed
@pkova pkova deleted the jb/trim-none branch May 8, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants