1
0
mirror of https://github.com/php/php-src.git synced 2026-04-20 22:41:20 +02:00
Files
archived-php-src/Zend/tests/exception_stream_wrapper.phpt
Nikita Popov 70bd46cdac Release trampoline on zend_call_function with active exception
zend_call_function() normally always releases a cached call
trampoline. Do this also if the call does not actually happen
due to an active exception, so the caller does not need to deal
with this very special case.

Fixes oss-fuzz #39792.
2021-10-11 11:23:20 +02:00

32 lines
493 B
PHP

--TEST--
Exception in stream wrapper + __call
--FILE--
<?php
class Loader {
function stream_open() {
return true;
}
function stream_read() {
echo "stream_read\n";
throw new Exception("Message");
}
function __call($m, $a) {
echo "$m\n";
}
}
stream_wrapper_register('abc', 'Loader');
try {
require 'abc://';
} catch (Exception $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
stream_set_option
stream_stat
stream_read
Message