Skip to content

Conversation

nielsdos
Copy link
Member

zval_ptr_dtor followed by RETURN_THROWS is always wrong, unless the return value is overwritten in between. That's because the VM will already destroy the zval, leading to double destroying it.

Copy link
Member

@devnexen devnexen left a comment

Choose a reason for hiding this comment

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

oh good to know

nielsdos added a commit that referenced this pull request Jul 17, 2025
* PHP-8.3:
  NEWS for GH-19162
  ext/socket: Remove incorrect zval_ptr_dtor
  ext/hash: Remove incorrect zval_ptr_dtor
@nielsdos nielsdos closed this in 86aaded Jul 17, 2025
nielsdos added a commit that referenced this pull request Jul 17, 2025
* PHP-8.4:
  NEWS for GH-19162
  ext/socket: Remove incorrect zval_ptr_dtor
  ext/hash: Remove incorrect zval_ptr_dtor
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.

3 participants