mirror of
https://github.com/php/php-src.git
synced 2024-09-23 02:47:26 +00:00
279ba58edb
* Adjust IS_SERIALIZED() check to account for potential empty allocations at the end of the memory region. * Deallocate empty allocation if all try/catch elements have been removed in the block pass (similar to what we do if all live ranges have been eliminated).
30 lines
521 B
PHP
30 lines
521 B
PHP
--TEST--
|
|
Bug #76275: Assertion failure in file cache when unserializing empty try_catch_array
|
|
--INI--
|
|
opcache.enabled=1
|
|
opcache.enable_cli=1
|
|
opcache.file_cache=/tmp
|
|
--FILE--
|
|
<?php
|
|
|
|
if (PHP_VERSION_ID >= 70000) {
|
|
echo "Done";
|
|
return;
|
|
}
|
|
|
|
if (!is_callable('random_bytes')) {
|
|
try {
|
|
} catch (com_exception $e) {
|
|
}
|
|
|
|
function random_bytes($length)
|
|
{
|
|
throw new Exception(
|
|
'There is no suitable CSPRNG installed on your system'
|
|
);
|
|
return '';
|
|
}
|
|
}
|
|
--EXPECT--
|
|
Done
|