[php-src] Issue #20567: date_sunrise undefined behavior

From: Date: Sun, 23 Nov 2025 12:06:04 +0000
Subject: [php-src] Issue #20567: date_sunrise undefined behavior
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-251289@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/20567 Author: chongwick ### Description The following code: ```php <?php $v_16296 = session_destroy(); $v_8104 = SUNFUNCS_RET_STRING; $v_8098 = INF; $v_8109 = date_sunrise($v_16296,$v_8104,$v_8110,$v_8109,$v_8098,$v_8094,); ``` Resulted in this output: ``` /home/w023dtc/nightly_php/php-src/ext/date/lib/astro.c:284:15: runtime error: -nan is outside the range of representable values of type 'long long' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/w023dtc/nightly_php/php-src/ext/date/lib/astro.c:284:15 ``` ### PHP Version ```plain nightly ``` ### Operating System ubuntu 22.04

« previous php.bugs (#251289) next »