[php-src] Issue #19979: undefined behavior zend_string.h

From: Date: Sat, 27 Sep 2025 15:31:27 +0000
Subject: [php-src] Issue #19979: undefined behavior zend_string.h
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-250922@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/19979 Author: chongwick ### Description The following code: ```php <?php $v_325483 = 42; $v_325457 = Uri\Rfc3986\Uri::parse($v_325483,); $v_325458 = var_dump($v_325457,); $v_325459 = array(); $v_325460 = '�~_~P~X'; $v_325468 = 'https://�~_~P~X.com/�~_~P~X?�~_~P~X=�~_~P~X'; $v_325461 = null; $v_325462 = Uri\WhatWg\Url::parse($v_325468,$v_325461,); $v_325462 = Uri\WhatWg\Url::parse($v_325460,$v_325462,$v_325459,); $v_325463 = var_dump($v_325462,); ``` Resulted in this output: ``` /home/w023dtc/nightly_php/php-src/Zend/zend_string.h:191:24: runtime error: null pointer passed as argument 2, which is declared to never be null /usr/include/string.h:44:28: note: nonnull attribute specified here SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/w023dtc/nightly_php/php-src/Zend/zend_string.h:191:24 ``` But I expected this output instead: ``` ``` ### PHP Version ```plain nightly ``` ### Operating System ubuntu 22.04

« previous php.bugs (#250922) next »