diff options
| author | Xinchen Hui <laruence@php.net> | 2012-10-19 11:24:56 +0800 |
|---|---|---|
| committer | Xinchen Hui <laruence@php.net> | 2012-10-19 11:24:56 +0800 |
| commit | c018d09c331822d02ede76a9f344d9337537afe5 (patch) | |
| tree | 0c79081b22a0e42cdabb874154ad936572e89ee6 | |
| parent | 542637dbd910f0a1048fc8edcd4a4d8e03cbe129 (diff) | |
| parent | bb51549915668adcc7c04e87568baef5e06bd03d (diff) | |
| download | php-git-c018d09c331822d02ede76a9f344d9337537afe5.tar.gz | |
Merge branch 'PHP-5.4'
| -rw-r--r-- | Zend/tests/bug63055.phpt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Zend/tests/bug63055.phpt b/Zend/tests/bug63055.phpt new file mode 100644 index 0000000000..711385a3ce --- /dev/null +++ b/Zend/tests/bug63055.phpt @@ -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 |
