mirror of
https://github.com/php/php-src.git
synced 2026-04-22 15:38:49 +02:00
a4b209fdcf
First drop it from EG(weakrefs), as the weakref_unref operation may call a destructor, which may bail out. Fixes oss-fuzz #39718.
19 lines
382 B
PHP
19 lines
382 B
PHP
--TEST--
|
|
Exception during WeakMap destruction during shutdown
|
|
--FILE--
|
|
<?php
|
|
$map = new WeakMap;
|
|
$obj = new stdClass;
|
|
$map[$obj] = new class {
|
|
function __destruct() {
|
|
throw new Exception("Test");
|
|
}
|
|
};
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Uncaught Exception: Test in %s:%d
|
|
Stack trace:
|
|
#0 [internal function]: class@anonymous->__destruct()
|
|
#1 {main}
|
|
thrown in %s on line %d
|