[GIT-PULLS] [php-src] PR #22679: Fix GH-22671: assert.bail must not unwind with a pending exception

[email protected] (iliaal)
Newsgroups php.git-pulls
Message-ID <[email protected]>
Pull Request: https://github.com/php/php-src/pull/22679
Author: iliaal

assert.bail called zend_throw_unwind_exit() (which requires no pending exception) right after printing the callback's exception, but that printing can itself re-throw (a throwing __toString or __destruct, or the stack guard re-tripping). Now it only unwinds when nothing is pending, otherwise the exception propagates, matching exit() and phar. The regression test re-throws from both __toString and __destruct, so it is deterministic and compiler-independent (unlike the reporter's stack-layout-sensitive recursion). Fixes #22671
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.