mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3: NEWS for hrtime in FTP and standard Handle broken hrtime in ftp Fix arginfo/zpp violation if zend_hrtime is not available
This commit is contained in:
commit
802e348b49
3 changed files with 7 additions and 2 deletions
4
NEWS
4
NEWS
|
@ -12,6 +12,9 @@ PHP NEWS
|
||||||
. Fixed bug GH-18581 (Coerce numeric string keys from iterators when argument
|
. Fixed bug GH-18581 (Coerce numeric string keys from iterators when argument
|
||||||
unpacking). (ilutov)
|
unpacking). (ilutov)
|
||||||
|
|
||||||
|
- FTP:
|
||||||
|
. Fix theoretical issues with hrtime() not being available. (nielsdos)
|
||||||
|
|
||||||
- Hash:
|
- Hash:
|
||||||
. Fix crash on clone failure. (nielsdos)
|
. Fix crash on clone failure. (nielsdos)
|
||||||
|
|
||||||
|
@ -41,6 +44,7 @@ PHP NEWS
|
||||||
- Standard:
|
- Standard:
|
||||||
. Fixed OSS Fuzz #433303828 (Leak in failed unserialize() with opcache).
|
. Fixed OSS Fuzz #433303828 (Leak in failed unserialize() with opcache).
|
||||||
(ilutov)
|
(ilutov)
|
||||||
|
. Fix theoretical issues with hrtime() not being available. (nielsdos)
|
||||||
|
|
||||||
31 Jul 2025, PHP 8.4.11
|
31 Jul 2025, PHP 8.4.11
|
||||||
|
|
||||||
|
|
|
@ -1491,7 +1491,8 @@ static int my_poll(php_socket_t fd, int events, int timeout) {
|
||||||
|
|
||||||
if (n == -1 && php_socket_errno() == EINTR) {
|
if (n == -1 && php_socket_errno() == EINTR) {
|
||||||
zend_hrtime_t delta_ns = zend_hrtime() - start_ns;
|
zend_hrtime_t delta_ns = zend_hrtime() - start_ns;
|
||||||
if (delta_ns > timeout_hr) {
|
/* delta_ns == 0 is only possible with a platform that does not support a high-res timer. */
|
||||||
|
if (delta_ns > timeout_hr || UNEXPECTED(delta_ns == 0)) {
|
||||||
#ifndef PHP_WIN32
|
#ifndef PHP_WIN32
|
||||||
errno = ETIMEDOUT;
|
errno = ETIMEDOUT;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -46,7 +46,6 @@
|
||||||
delivered timestamp is monotonic and cannot be adjusted. */
|
delivered timestamp is monotonic and cannot be adjusted. */
|
||||||
PHP_FUNCTION(hrtime)
|
PHP_FUNCTION(hrtime)
|
||||||
{
|
{
|
||||||
#if ZEND_HRTIME_AVAILABLE
|
|
||||||
bool get_as_num = 0;
|
bool get_as_num = 0;
|
||||||
zend_hrtime_t t = zend_hrtime();
|
zend_hrtime_t t = zend_hrtime();
|
||||||
|
|
||||||
|
@ -55,6 +54,7 @@ PHP_FUNCTION(hrtime)
|
||||||
Z_PARAM_BOOL(get_as_num)
|
Z_PARAM_BOOL(get_as_num)
|
||||||
ZEND_PARSE_PARAMETERS_END();
|
ZEND_PARSE_PARAMETERS_END();
|
||||||
|
|
||||||
|
#if ZEND_HRTIME_AVAILABLE
|
||||||
if (UNEXPECTED(get_as_num)) {
|
if (UNEXPECTED(get_as_num)) {
|
||||||
PHP_RETURN_HRTIME(t);
|
PHP_RETURN_HRTIME(t);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue