Skip to content

cshutdown: use ptrarray instead of llist - #23234

Closed
icing wants to merge 3 commits into
curl:masterfrom
icing:chsutdn-array
Closed

icing wants to merge 3 commits into
curl:masterfrom
icing:chsutdn-array

Conversation

@icing

@icing icing commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Replace the llist used so far in connection shutdown handling with a new ptrarray, removing the llist nodes from struct connectdata.

Add unit tests of ptrarray in unit3211.

@github-actions github-actions Bot added the tests label Oct 2, 2026
@icing
icing requested a review from bagder October 2, 2026 11:45
@bagder
bagder requested a balanced review from Copilot October 3, 2026 21:35

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.

Copilot review overview

🟡 Changes recommended

Repeated stable array removals make shutdown cleanup quadratic, and several naming/documentation errors remain.

Review effort: Balanced
Findings: 2 Medium severity · 2 Low severity

Open (4)
What changed in this PR

Replaces connection-shutdown linked lists with a pointer-array container and adds unit coverage.

Changes:

  • Adds the ptrarray implementation.
  • Migrates shutdown tracking to pointer arrays.
  • Extends unit3211 coverage and metadata.
File Description
lib/​ptrarray.c Implements pointer-array operations.
lib/​ptrarray.h Defines the pointer-array API.
lib/​cshutdn.c Migrates shutdown handling to pointer arrays.
lib/​cshutdn.h Updates shutdown state storage.
lib/​urldata.h Removes the embedded list node.
lib/​Makefile.inc Registers new source files.
tests/​unit/​unit3211.c Adds pointer-array tests.
tests/​data/​test3211 Updates test metadata.

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

Comment thread lib/cshutdn.c Resolved
Comment thread tests/data/test3211 Resolved
Comment thread lib/ptrarray.h Resolved
Comment thread tests/unit/unit3211.c Resolved
icing added 3 commits October 5, 2026 08:53
Replace the llist used so far in connection shutdown handling with
a new `ptrarray`, removing the llist nodes from `struct connectdata`.

Add unit tests of `ptrarray` in unit3211.
@bagder bagder closed this in ed9a5f9 Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants