Download src/php/php-src/Zend/tests/gc/bug63055.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 540 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/gc/bug63055.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/gc/bug63055.phpt
-
curl -L -o bug63055.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/gc/bug63055.phpt
540 Bytes
| --TEST-- | |
| Bug #63055 (Segfault in zend_gc with SF2 testsuite) | |
| --INI-- | |
| zend.enable_gc=1 | |
| --FILE-- | |
| /* 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"; | |
| --EXPECT-- | |
| okey | |