dis-bench / src /php /php-src /Zend /tests /concat /bug79836_4.phpt
meddyrat's picture
Replace repository contents with the original corrected artifact
1e94262
Raw History Blame Contribute Delete
370 Bytes
--TEST--
Bug #79836 (use-after-free in concat_function)
--INI--
memory_limit=10M
--FILE--
<?php
class Foo {
public function __toString() {
return str_repeat('a', 10);
}
}
$i = str_repeat('a', 5 * 1024 * 1024);
$e = new Foo();
$e .= $i;
?>
--EXPECTF--
Fatal error: Allowed memory size of %d bytes exhausted%s(tried to allocate %d bytes) in %s on line %d