diff --git a/NEWS b/NEWS index 1ca375ce8ba..9b1fc5f8541 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,8 @@ PHP NEWS . Fixed NULL arithmetic during system program execution on Windows. (cmb, nielsdos) . Fixed potential OOB when checking for trailing spaces on Windows. (cmb) + . Fixed bug GH-17408 (Assertion failure Zend/zend_exceptions.c). + (nielsdos, ilutov) - DOM: . Fixed bug GH-17500 (Segfault with requesting nodeName on nameless doctype). diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 11b615c214a..a4e1c2f98c6 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -193,7 +193,6 @@ ZEND_API ZEND_COLD void zend_throw_exception_internal(zend_object *exception) /* zend_exception_set_previous(exception, EG(exception)); EG(exception) = exception; if (previous) { - ZEND_ASSERT(is_handle_exception_set() && "HANDLE_EXCEPTION not set?"); return; } } diff --git a/ext/zend_test/tests/gh17408.phpt b/ext/zend_test/tests/gh17408.phpt new file mode 100644 index 00000000000..f54a7b81fce --- /dev/null +++ b/ext/zend_test/tests/gh17408.phpt @@ -0,0 +1,22 @@ +--TEST-- +GH-17408 (Assertion failure Zend/zend_exceptions.c) +--EXTENSIONS-- +zend_test +--FILE-- + +--EXPECTF-- +Fatal error: Uncaught Exception: Throwing resource destructor called in %s:%d +Stack trace: +#0 %s(%d): test() +#1 {main} + +Next Exception: Throwing resource destructor called in %s:%d +Stack trace: +#0 {main} + thrown in %s on line %d