Skip to content

integer overflow at dow.c157:30 #17025

Closed
Closed
@chongwick

Description

@chongwick

Description

The following code:

<?php
$date = date_create();
date_isodate_set($date, date('Y'), 1, PHP_INT_MIN);
?>

Resulted in this output:

/home/dan/php-src/ext/date/lib/dow.c:157:30: runtime error: signed integer overflow: -9223372036854775808 + -1 cannot be represented in type 'long long int'

But I expected this output instead:

PHP Version

8.4.1

Operating System

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions