Skip to content

ExtUvLoop silently allows timers which cause integer overflow #194

@ghost

Description

ExtUvLoop allows timers with an time or interval value that cause the internal conversion to cause an integer overflow to 0.

\uv_timer_start(
$event,
(int) ($interval * 1000) + 1,
0,
$callback
);

Using \PHP_INT_MAX silently causes an integer overflow to 0, and results in an intermediate firing of the timer callback.

The loop implementation should instead throw an exception if the conversion could cause an integer overflow.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions