Skip to content

Invalid range of representable values of type in ext/standard/fsock.c #14780

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

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

Comments

@YuanchengJiang
Copy link

Description

The following code:

<?php
$random_var=-9223372036854775808;
pfsockopen($random_var, $x, $random_var, $x, $random_var);

Resulted in this output:

/php-src/ext/standard/fsock.c:77:9: runtime error: -9.22337e+24 is outside the range of representable values of type 'long'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /php-src/ext/standard/fsock.c

(Unsure about the impact of "outside the range", let me know if you would like to ignore such errors)

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 6, 2024
devnexen added a commit to devnexen/php-src that referenced this issue Jul 22, 2024
devnexen added a commit to devnexen/php-src that referenced this issue Jul 22, 2024
devnexen added a commit to devnexen/php-src that referenced this issue Jul 22, 2024
devnexen added a commit to devnexen/php-src that referenced this issue Jul 22, 2024
devnexen added a commit to devnexen/php-src that referenced this issue Jul 22, 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