Skip to content

u8_strset, u32_ptrset: fix boundaries handling - #22991

Closed
icing wants to merge 3 commits into
curl:masterfrom
icing:u8_strset-u32_ptrset-boundaries
Closed

icing wants to merge 3 commits into
curl:masterfrom
icing:u8_strset-u32_ptrset-boundaries

Conversation

@icing

@icing icing commented Sep 18, 2026

Copy link
Copy Markdown
Contributor
  • u8_strset: iterator over all entries using a uint16_t index
  • u32_ptrset: limit max size to 31 bits, managing INT32_MAX entries

- u8_strset: iterator over all entries using a uint16_t index
- u32_ptrset: limit max size to 31 bits, managing INT32_MAX entries

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new growth boundary permits allocation-size overflow on 32-bit targets, and the documented maximum is inconsistent with the implementation.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Updates set boundary handling for maximum capacities.

Changes:

  • Uses a 16-bit iterator when rehashing u8_strset.
  • Limits u32_ptrset growth to 31 slot bits.
  • Updates the documented pointer capacity.
File summaries
File Description
lib/u8_strset.c Widens the rehash iterator.
lib/u32_ptrset.c Adds the 31-bit growth limit.
lib/u32_ptrset.h Revises capacity documentation.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 2
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lib/u32_ptrset.c
Comment thread lib/u32_ptrset.h Outdated
@icing
icing requested a review from bagder September 18, 2026 09:01
@bagder bagder closed this in 8e20dbc Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants