mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
preg indenpent test script for #63055
This commit is contained in:
parent
6444eef27b
commit
90bd54c46e
23
Zend/tests/bug63055.phpt
Normal file
23
Zend/tests/bug63055.phpt
Normal file
@ -0,0 +1,23 @@
|
||||
--TEST--
|
||||
Bug #63055 (Segfault in zend_gc with SF2 testsuite)
|
||||
--FILE--
|
||||
<?php
|
||||
/* the default gc root size is 10,000 */
|
||||
for ($i=0; $i<9998; $i++) {
|
||||
$array = array();
|
||||
$array[0] = &$array;
|
||||
unset($array);
|
||||
}
|
||||
|
||||
$matches = array("foo" => "bar"); /* this bucket will trigger the segfault */
|
||||
$dummy = array("dummy"); /* used to trigger gc_collect_cycles */
|
||||
$dummy[1] = &$dummy;
|
||||
|
||||
$matches[1] = &$matches;
|
||||
$matches[2] = $dummy;
|
||||
|
||||
str_replace("foo", "bar", "foobar", $matches);
|
||||
echo "okey";
|
||||
?>
|
||||
--EXPECTF--
|
||||
okey
|
Loading…
Reference in New Issue
Block a user