php-src/ext/opcache/tests/bug76275.phpt
Nikita Popov 279ba58edb Fixed bug #76275
* 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).
2018-04-27 17:01:35 +02:00

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