Skip to content

Throw UnwindExit on timeout - #25187

Open
arnaud-lb wants to merge 3 commits into
php:masterfrom
arnaud-lb:timeout-unwind
Open

arnaud-lb wants to merge 3 commits into
php:masterfrom
arnaud-lb:timeout-unwind

Conversation

@arnaud-lb

Copy link
Copy Markdown
Member

max_execution_time is handled like this:

  • A signal handler sets EG(vm_interrupt) and EG(timed_out)
  • The VM calls zend_timeout() from a safe point when these flags are set
  • zend_timeout() triggers a fatal error -> zend_bailout()

Change the last step so that zend_timeout() throws an UnwindExit exception instead.

@arnaud-lb
arnaud-lb marked this pull request as ready for review November 6, 2026 12:50
@arnaud-lb
arnaud-lb requested a review from dstogov as a code owner November 6, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant