Bug #47962 [Com]: preg_split cause Segmentation Fault

From: Date: Fri, 27 Nov 2015 06:07:06 +0000
Subject: Bug #47962 [Com]: preg_split cause Segmentation Fault
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-197451@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=47962&edit=1 ID: 47962 Comment by: qp10509 at gmail dot com Reported by: poltorak at alsenet dot com Summary: preg_split cause Segmentation Fault Status: Closed Type: Bug Package: PCRE related Operating System: Ubuntu Linux PHP Version: 5.2.6 Block user comment: N Private report: N New Comment: The same error occurred!!! OS : Macintosh OSX 10.9.5 PHPVersion : [5.5.10] [5.4.26] [5.3.28] [5.2.17] Previous Comments: ------------------------------------------------------------------------ [2009-04-13 16:28:01] jani@php.net Works fine with PHP 5.2.9. Update! ------------------------------------------------------------------------ [2009-04-13 15:50:54] poltorak at alsenet dot com Description: ------------ This code cause segmentation fault in PHP Version 5.2.6-2ubuntu4.1 I can't check it on 5.2.9 for now. Please check. If I reduce 200 (in for cycle) to 100, everything works. If I delete ",'1'" at the end of $t string, everything works. Reproduce code: --------------- <? $t = "'1','8','10','1','5','3','0','0','0','4','2','9','0','1';"; $a = ""; for ($i=0; $i<200; $i++) $a .= $t; print preg_split("/;+(?=([^'|^\\\']*['|\\\'][^'|^\\\']*['|\\\'])*[^'|^\\\']*[^'|^\\\']$)/", $a); ?> Expected result: ---------------- Array Actual result: -------------- Segmentation Fault in error_log and empty page in browser. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=47962&edit=1

« previous php.bugs (#197451) next »