Closed
Description
Description
The following code:
<?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