Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected termination (-nan is outside the range) in ext/standard/basic_functions.c #14774

Closed
YuanchengJiang opened this issue Jul 3, 2024 · 0 comments

Comments

@YuanchengJiang
Copy link

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

@devnexen devnexen self-assigned this Jul 3, 2024
devnexen added a commit to devnexen/php-src that referenced this issue Jul 3, 2024
devnexen added a commit to devnexen/php-src that referenced this issue Jul 3, 2024
devnexen added a commit to devnexen/php-src that referenced this issue Jul 5, 2024
devnexen added a commit to devnexen/php-src that referenced this issue Jul 6, 2024
devnexen added a commit to devnexen/php-src that referenced this issue Jul 6, 2024
devnexen added a commit to devnexen/php-src that referenced this issue Jul 6, 2024
devnexen added a commit to devnexen/php-src that referenced this issue Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants