Skip to content

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

Open
joemfb wants to merge 1 commit intodevelopfrom
jb/trim-none
Open

u3: fix return type in hashtable trim when missing key#995
joemfb wants to merge 1 commit intodevelopfrom
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
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.

1 participant