Skip to content

date_sun_info() fails for non-finite values #14732

Closed
@YuanchengJiang

Description

@YuanchengJiang

Description

The following code:

<?php
$nan = NAN;
date_sun_info(1, $nan, 1);

Resulted in this output:

/php-src/ext/date/lib/astro.c:268:17: runtime error: -nan is outside the range of representable values of type 'long long'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /php-src/ext/date/lib/astro.c:268:17

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