Skip to content

zend_ast: Fix leak of duplicate named argument in new in initializer - #25059

Closed
jorgsowa wants to merge 1 commit into
php:PHP-8.4from
jorgsowa:fix-new-initializer-dup-named-arg-leak
Closed

jorgsowa wants to merge 1 commit into
php:PHP-8.4from
jorgsowa:fix-new-initializer-dup-named-arg-leak

Conversation

@jorgsowa

Copy link
Copy Markdown
Contributor

When a new expression in a constant expression has a duplicate named argument, zend_hash_add() fails and the "Named parameter overwrites previous argument" Error is thrown. The argument that was just evaluated was never freed.

@jorgsowa jorgsowa self-assigned this Oct 30, 2026
@jorgsowa jorgsowa changed the title ast: Fix leak of duplicate named argument in new in initializer zend_ast: Fix leak of duplicate named argument in new in initializer Oct 30, 2026

@ndossche ndossche 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.

Good find

@jorgsowa jorgsowa closed this in dfcc043 Oct 31, 2026
Sign up for free to 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.

2 participants