Skip to content

uri: Simplify memory-management in php_uri_parse() - #19928

Merged
TimWolla merged 1 commit into
php:PHP-8.5from
TimWolla:uri-parse-memory-management
Oct 14, 2025
Merged

uri: Simplify memory-management in php_uri_parse()#19928
TimWolla merged 1 commit into
php:PHP-8.5from
TimWolla:uri-parse-memory-management

Conversation

@TimWolla

Copy link
Copy Markdown
Member

We can try parsing before allocating the uri_internal_t struct.


Extracted from #19624.

@kocsismatekocsismate left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM apart from the nit

Comment threadext/uri/php_uri.c Outdated
We can try parsing before allocating the `uri_internal_t` struct.
@TimWolla
TimWollaforce-pushed the uri-parse-memory-management branch from 630ee14 to 2f4e857CompareOctober 12, 2025 19:39
@TimWolla
TimWolla requested a review from a teamOctober 12, 2025 19:43
@TimWolla

TimWolla commented Oct 12, 2025

Copy link
Copy Markdown
MemberAuthor

For RMs: Would like to merge this in 8.5 to reduce avoidable differences between 8.5 and master while still in RC. It's not a bugfix, but a small cleanup that doesn't affect behavior. Is that good with you? Branch is already based on 8.5, so would just need a target branch change without NEWS.

@edorianedorian left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

RM approval 👍

@TimWolla
TimWolla changed the base branch from master to PHP-8.5October 14, 2025 06:36
@TimWolla
TimWolla merged commit 84c7c03 into php:PHP-8.5Oct 14, 2025
10 checks passed
TimWolla added a commit that referenced this pull request Oct 14, 2025
* PHP-8.5:
uri: Simplify memory-management in `php_uri_parse()` (#19928)
@TimWolla
TimWolla deleted the uri-parse-memory-management branch October 14, 2025 06:37
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@TimWolla@edorian@alexandre-daubois@kocsismate@DanielEScherzer