mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00

In this case zend_exception_set_previous() would destroy the fast_call exception and further accesses on ex would be invalid. We should only update ex if we update EG(exception). Fixes oss-fuzz #40464.
18 lines
356 B
PHP
18 lines
356 B
PHP
--TEST--
|
|
Test case where the implicit previous finally exception would result in recursion
|
|
--FILE--
|
|
<?php
|
|
try {
|
|
$e = new Exception("M1");
|
|
try {
|
|
throw new Exception("M2", 0, $e);
|
|
} finally {
|
|
throw $e;
|
|
}
|
|
} finally {}
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Uncaught Exception: M1 in %s:%d
|
|
Stack trace:
|
|
#0 {main}
|
|
thrown in %s on line %d
|