|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-07-21 12:34 UTC] cmb@php.net
-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: cmb
[2016-07-21 12:34 UTC] cmb@php.net
[2016-07-31 04:22 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 06:00:01 2025 UTC |
Description: ------------ Running preg_replace on a string length over 8435 causes a segmentation fault. Running default php.ini config. Please see attached script to reproduce. This happens on the CLI as well as through an apache handler. Test script: --------------- <?php $pattern = '/(.)*/'; $limit = 9000; $string = 'a'; for ( $i = 0; $i <= $limit; $i++ ) { $string .= 'a'; echo strlen($string) . "\n"; echo mb_strlen($string); preg_replace($pattern, '', $string); } echo 'done'; exit;