mirror of
https://github.com/php/php-src.git
synced 2024-09-27 04:47:22 +00:00
d974e44248
already fixed in trunk/5.3 and now merged onto 5.4 and a leak introduced in fixing bug #61115. This better fix for #61115 fixes the leak (the inhibition for deleting the context was too broad) and so prevents segfaults in new circumstances (where the inhibition was not broad enough).
14 lines
417 B
PHP
14 lines
417 B
PHP
--TEST--
|
|
Bug #61115: Stream related segfault on fatal error in php_stream_context_del_link.
|
|
--FILE--
|
|
<?php
|
|
|
|
$arrayLarge = array_fill(0, 113663, '*');
|
|
|
|
$resourceFileTemp = fopen('php://temp', 'r+');
|
|
stream_context_set_params($resourceFileTemp, array());
|
|
preg_replace('', function() {}, $resourceFileTemp);
|
|
?>
|
|
--EXPECTF--
|
|
Catchable fatal error: Object of class Closure could not be converted to string in %s on line %d
|