php IHDR w Q )Ba pHYs sRGB gAMA a IDATxMk\U s&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨ G;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j- $_q?qS XzG'ay
files >> /php-7.1.11/ext/pcre/tests/ |
files >> //php-7.1.11/ext/pcre/tests/bug69864.phpt |
--TEST-- Bug #69864 (Segfault in preg_replace_callback) --SKIPIF-- <?php if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); ?> --FILE-- <?php /* CAUTION: this test will most likely fail with valgrind until --smc-check=all is used. */ const PREG_CACHE_SIZE = 4096; // this has to be >= the resp. constant in php_pcre.c var_dump(preg_replace_callback('/a/', function($m) { for ($i = 0; $i < PREG_CACHE_SIZE; $i++) { preg_match('/foo' . $i . 'bar/', '???foo' . $i . 'bar???'); } return 'b'; }, 'aa')); var_dump(preg_replace_callback('/a/', function($m) { for ($i = 0; $i < PREG_CACHE_SIZE; $i++) { preg_replace('/foo' . $i . 'bar/', 'baz', '???foo' . $i . 'bar???'); } return 'b'; }, 'aa')); var_dump(preg_replace_callback('/a/', function($m) { for ($i = 0; $i < PREG_CACHE_SIZE; $i++) { preg_split('/foo' . $i . 'bar/', '???foo' . $i . 'bar???'); } return 'b'; }, 'aa')); var_dump(preg_replace_callback('/a/', function($m) { for ($i = 0; $i < PREG_CACHE_SIZE; $i++) { preg_grep('/foo' . $i . 'bar/', ['???foo' . $i . 'bar???']); } return 'b'; }, 'aa')); ?> --EXPECT-- string(2) "bb" string(2) "bb" string(2) "bb" string(2) "bb"y~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`