Skip to content

Commit 3b2764b

Browse files
committed
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: Use ITIMER_REAL for timeout handling on MacOS / Apple Silicon system
2 parents 034bd85 + 272da51 commit 3b2764b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ PHP NEWS
44

55
- Core:
66
. Fixed bug GH-14315 (Incompatible pointer type warnings). (Peter Kokot)
7+
. Fixed bug GH-12814 (max_execution_time reached too early on MacOS 14
8+
when running on Apple Silicon). (Manuel Kress)
79

810
- Curl:
911
. Fixed bug GH-14307 (Test curl_basic_024 fails with curl 8.8.0). (nielsdos)

Zend/zend_execute_API.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1555,7 +1555,9 @@ static void zend_set_timeout_ex(zend_long seconds, bool reset_signals) /* {{{ */
15551555
t_r.it_value.tv_sec = seconds;
15561556
t_r.it_value.tv_usec = t_r.it_interval.tv_sec = t_r.it_interval.tv_usec = 0;
15571557

1558-
# if defined(__CYGWIN__) || defined(__PASE__)
1558+
# if defined(__CYGWIN__) || defined(__PASE__) || (defined(__aarch64__) && defined(__APPLE__))
1559+
// ITIMER_PROF is broken in Apple Silicon system with MacOS >= 14
1560+
// See https://openradar.appspot.com/radar?id=5583058442911744.
15591561
setitimer(ITIMER_REAL, &t_r, NULL);
15601562
}
15611563
signo = SIGALRM;
@@ -1619,7 +1621,7 @@ void zend_unset_timeout(void) /* {{{ */
16191621

16201622
no_timeout.it_value.tv_sec = no_timeout.it_value.tv_usec = no_timeout.it_interval.tv_sec = no_timeout.it_interval.tv_usec = 0;
16211623

1622-
# if defined(__CYGWIN__) || defined(__PASE__)
1624+
# if defined(__CYGWIN__) || defined(__PASE__) || (defined(__aarch64__) && defined(__APPLE__))
16231625
setitimer(ITIMER_REAL, &no_timeout, NULL);
16241626
# else
16251627
setitimer(ITIMER_PROF, &no_timeout, NULL);

0 commit comments

Comments
 (0)