Skip to content

Conversation

iluuu1994
Copy link
Member

Fixes GH-19892

@TimWolla
Copy link
Member

I just realize, there is a much simpler fix:

--- i/ext/uri/php_uri.c
+++ w/ext/uri/php_uri.c
@@ -308,7 +308,7 @@ static zend_result pass_errors_by_ref_and_free(zval *errors_zv, zval *errors)
                return SUCCESS;
        }
 
-       ZEND_TRY_ASSIGN_REF_ARR(errors_zv, Z_ARRVAL_P(errors));
+       ZEND_TRY_ASSIGN_REF_TMP(errors_zv, errors);
        if (EG(exception)) {
                return FAILURE;
        }

The assertion still makes sense to me, though.

@iluuu1994
Copy link
Member Author

Yeah that works too and seems like the best solution.

Copy link
Member

@kocsismate kocsismate left a comment

Choose a reason for hiding this comment

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

Thank you!

@iluuu1994 iluuu1994 merged commit 5897071 into php:master Sep 21, 2025
9 checks passed
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.

segmentation faul in zend_types.h
3 participants