[php-src] PR #22619: ext/standard: Fix `sleep` and `usleep` signed integer overflow

From: Date: Mon, 06 Jul 2026 16:32:30 +0000
Subject: [php-src] PR #22619: ext/standard: Fix `sleep` and `usleep` signed integer overflow
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-36864@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/22619 Author: LamentXU123 sleep(4294967296) actually sleep 0 seconds because of a signed int overflow bug, see [here](https://onlinephp.io?s=s7EvyCjg5SrOSU0t0DAxsjSxNDM3sjTTtOblKsUmaG8HAA%2C%2C&v=8.5.6) This is also true in usleep I target this to master as a fix that is classified as a stricter parsing. Now we throw ValueError instead. p.s.: in Windows, the sleep function is implemented with SleepEx(t * 1000, TRUE) not php_sleep, phew, so we need to lower the threshold to UINT_MAX / 1000

« previous php.git-pulls (#36864) next »