Bug #70562 [Fbk->NoF]: preg_replace segmentation fault - string length

From: Date: Sun, 31 Jul 2016 04:22:27 +0000
Subject: Bug #70562 [Fbk->NoF]: preg_replace segmentation fault - string length
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-202744@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70562&edit=1 ID: 70562 Updated by: php-bugs@lists.php.net Reported by: malcolm at memiah dot co dot uk Summary: preg_replace segmentation fault - string length -Status: Feedback +Status: No Feedback Type: Bug Package: PCRE related Operating System: CentOS Linux release 7.0.1406 (C PHP Version: 5.6.13 Assigned To: cmb Private report: N New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Re-Opened". Thank you. Previous Comments: ------------------------------------------------------------------------ [2016-07-21 12:34:26] cmb@php.net Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. ------------------------------------------------------------------------ [2015-09-23 14:02:47] malcolm at memiah dot co dot uk 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; ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70562&edit=1

« previous php.bugs (#202744) next »