mirror of
https://github.com/php/php-src.git
synced 2026-04-20 22:41:20 +02:00
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.
32 lines
493 B
PHP
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
|