Skip to content

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

Closed
@YuanchengJiang

Description

@YuanchengJiang

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions