[php-src] Issue #20936: undefined behavior in zend_API.c

From: Date: Wed, 14 Jan 2026 15:45:13 +0000
Subject: [php-src] Issue #20936: undefined behavior in zend_API.c
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-251548@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/20936 Author: chongwick ### Description The following code: ```php <?php $v_973 = '2022-07-16 12:00:00'; $v_974 = 'UTC'; $v_975 = new DateTimeZone($v_974,); $v_976 = new DateTime($v_973,$v_975,); $v_978 = null; $v_980 = 'P2D'; $v_981 = new DateInterval($v_980,); $v_983 = 2; $v_985 = False; $v_987 = True; $v_966 = array('start' => $v_988,'end' => $v_976,'current' => $v_978,'interval' => $v_981,'recurrences' => $v_983,'include_start_date' => $v_985,'include_end_date' => $v_987,); $v_988 = DatePeriod::__set_state($v_966,); $v_989 = var_dump($v_988,); ``` Resulted in this output: ``` /home/w023dtc/nightly_php/php-src/Zend/zend_API.c:1794:6: runtime error: member access within null pointer of type 'zend_class_entry' (aka 'struct _zend_class_entry') SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/w023dtc/nightly_php/php-src/Zend/zend_API.c:1794 ``` ### PHP Version ```plain nightly ``` ### Operating System ubuntu 22.04

« previous php.bugs (#251548) next »