Skip to content

Commit 4cc395e

Browse files
committed
Merge branch 'PHP-8.4'
* PHP-8.4: Fix hard_timeout when zend-max-execution-timers is enabled
2 parents 3e95422 + c733491 commit 4cc395e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ PHP NEWS
66
. Fixed bug GH-19765 (object_properties_load() bypasses readonly property
77
checks). (timwolla)
88
. The __sleep() and __wakeup() magic methods have been deprecated. (Girgias)
9+
. Fixed hard_timeout with --enable-zend-max-execution-timers. (Appla)
910

1011
- Opcache:
1112
. Fixed bug GH-19669 (assertion failure in zend_jit_trace_type_to_info_ex).

Zend/zend_execute_API.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1580,7 +1580,9 @@ static void zend_set_timeout_ex(zend_long seconds, bool reset_signals) /* {{{ */
15801580
return;
15811581
}
15821582
#elif defined(ZEND_MAX_EXECUTION_TIMERS)
1583-
zend_max_execution_timer_settime(seconds);
1583+
if (seconds > 0) {
1584+
zend_max_execution_timer_settime(seconds);
1585+
}
15841586

15851587
if (reset_signals) {
15861588
sigset_t sigset;
@@ -1667,7 +1669,9 @@ void zend_unset_timeout(void) /* {{{ */
16671669
tq_timer = NULL;
16681670
}
16691671
#elif defined(ZEND_MAX_EXECUTION_TIMERS)
1670-
zend_max_execution_timer_settime(0);
1672+
if (EG(timeout_seconds)) {
1673+
zend_max_execution_timer_settime(0);
1674+
}
16711675
#elif defined(HAVE_SETITIMER)
16721676
if (EG(timeout_seconds)) {
16731677
struct itimerval no_timeout;

0 commit comments

Comments
 (0)