diff options
author | Xinchen Hui <laruence@php.net> | 2012-10-18 17:32:48 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@php.net> | 2012-10-18 17:33:52 +0800 |
commit | 54cef2bb6d4d0527ac161b900b0b475d2ce312fb (patch) | |
tree | c07cf3d48017f554a6b82687e9ba0078878c5252 /ext/pcre/tests | |
parent | 4d509708a454c736a2f15f1a4ec7567c26659086 (diff) | |
parent | 8bd5e15ff7a57791956c4017ee8fb4a8ac0d8d2e (diff) | |
download | php-git-54cef2bb6d4d0527ac161b900b0b475d2ce312fb.tar.gz |
Merge branch 'PHP-5.3' into PHP-5.4
Diffstat (limited to 'ext/pcre/tests')
-rw-r--r-- | ext/pcre/tests/bug63055.phpt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/ext/pcre/tests/bug63055.phpt b/ext/pcre/tests/bug63055.phpt new file mode 100644 index 0000000000..16c50b54e5 --- /dev/null +++ b/ext/pcre/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; + +preg_match_all("/(\d)+/", "foo123456bar", $matches); +echo "okey"; +?> +--EXPECTF-- +okey |