[php-src] Issue #20771: uri segv

From: Date: Tue, 23 Dec 2025 17:50:15 +0000
Subject: [php-src] Issue #20771: uri segv
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-251428@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/20771 Author: chongwick ### Description The following code: ```php <?php $v_1030 = 'https://🐘.com/🐘?🐘=🐘'; $v_1019 = Uri\Rfc3986\Uri::parse($v_1030,); $v_7406 = 'test://'; $v_7408 = 'http://soapinterop.org/'; $v_7410 = 1; $v_7412 = 0; $v_7404 = array('location' => $v_7406,'uri' => $v_7408,'trace' => $v_7410,'exceptions' => $v_7412,); $v_1020 = var_dump($v_7404,); $v_1021 = array(); $v_7422 = 'soapaction'; $v_7403 = NULL; $v_7413 = new SoapClient($v_7403,$v_7404,);$v_7427 = $v_7413->__getlastrequest(); $v_1033 = var_dump($v_7427,); $v_1024 = Uri\WhatWg\Url::parse($v_7406,$v_1033,);$v_1036 = $v_1024->getUnicodeHost(); $v_1019 = Uri\Rfc3986\Uri::parse($v_7412,); $v_1024 = Uri\WhatWg\Url::parse($v_7422,$v_1036,$v_1019,); ``` Resulted in this output: ``` array(4) { ["location"]=> string(7) "test://" ["uri"]=> string(23) "http://soapinterop.org/" ["trace"]=> int(1) ["exceptions"]=> int(0) } NULL Fatal error: Uncaught TypeError: Uri\WhatWg\Url::parse(): Argument #2 ($baseUrl) must be of type ?Uri\WhatWg\Url, string given in /home/w023dtc/TreeFuzz/scripts/trash/66e015245aebc8f01238.php.er:17 Stack trace: #0 /home/w023dtc/TreeFuzz/scripts/trash/66e015245aebc8f01238.php.er(17): Uri\WhatWg\Url::parse('soapaction', '', Object(Uri\Rfc3986\Uri)) #1 {main} thrown in /home/w023dtc/TreeFuzz/scripts/trash/66e015245aebc8f01238.php.er on line 17 php: /home/w023dtc/nightly_php/php-src/Zend/zend_variables.c:64: void zend_string_destroy(zend_string *): Assertion `!(zval_gc_flags((str)->gc.u.type_info) & (1<<6))' failed. Aborted (core dumped) ``` ### PHP Version ```plain nightly ``` ### Operating System 22.04

« previous php.bugs (#251428) next »