Skip to content

http: actually unlink first item; return early - #1071

Draft
dozreg-toplud wants to merge 3 commits into
developfrom
dozreg/http-unlink
Draft

http: actually unlink first item; return early#1071
dozreg-toplud wants to merge 3 commits into
developfrom
dozreg/http-unlink

Conversation

@dozreg-toplud

Copy link
Copy Markdown
Contributor

If the first element of the linked list htp_u->htd_u->htp_u was the element we wanted to unlink, then the function would noop.

Also, if an element got unlinked, we would keep iterating over the linked list instead of returning early. I am assuming that the linked list does not hold duplicate entries.

There is potential for more optimizations: if the linked list is guaranteed to hold htp_u then the while loop could be made unconditional, removing extra checks. Though I do not know if this actually holds.

@dozreg-toplud
dozreg-toplud requested a review from a team as a code owner July 29, 2026 16:00
@dozreg-toplud
dozreg-toplud requested a review from pkova July 29, 2026 16:00
@dozreg-toplud

Copy link
Copy Markdown
Contributor Author

Huh? Can't reproduce the crash with --gc-abort at ff3942d

@dozreg-toplud

Copy link
Copy Markdown
Contributor Author

What is going on? eddcfc9 and ff3942d should be the same, yet the latter failed in CI with a leak.

@dozreg-toplud
dozreg-toplud marked this pull request as draft July 30, 2026 11:52
@dozreg-toplud

Copy link
Copy Markdown
Contributor Author

Let's get #1072 merged first, then I'll rebase to run the CI with UB fixes,

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