[php-src] Issue #14774: Unexpected termination (-nan is outside the range) in ext/standard/basic_functions.c

From: Date: Wed, 03 Jul 2024 03:01:04 +0000
Subject: [php-src] Issue #14774: Unexpected termination (-nan is outside the range) in ext/standard/basic_functions.c
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-247210@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/14774 Author: YuanchengJiang ### Description The following code: ```php <?php $values1 = array(234, false); $values2 = array(2, false); for ($i = 0; $i < count($values1); $i++) { for ($j = 0; $j < count($values2); $j++) { $res = fmod($values1[$i], $values2[$j]); } } time_sleep_until($res); ``` Resulted in this output: ``` Terminated ``` ASan: ``` /php-src/ext/standard/basic_functions.c:1207:14: runtime error: -nan is outside the range of representable values of type 'unsigned long' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /php-src/ext/standard/basic_functions.c:1207:14 ``` ### PHP Version PHP 8.4.0-dev ### Operating System ubuntu 22.04

« previous php.bugs (#247210) next »