php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63846 preg_match cause segmentation fault
Submitted: 2012-12-24 10:40 UTC Modified: 2012-12-24 12:19 UTC
From: saprykin dot dmitry at gmail dot com Assigned:
Status: Not a bug Package: PCRE related
PHP Version: 5.4.10 OS:
Private report: No CVE-ID: None
 [2012-12-24 10:40 UTC] saprykin dot dmitry at gmail dot com
Description:
------------
simple regular expression causes segmentation fault. Details are below.

Test script:
---------------
$text = str_repeat('text ', 870);
echo 'Text size: '.strlen($text).PHP_EOL;
preg_match('/([a-z]\s*)+/', $text);
echo 'Working!';

Expected result:
----------------
Text size: 4350
Working!

Actual result:
--------------
Text size: 4350
Segmentation fault (core dumped)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-12-24 11:21 UTC] felipe@php.net
-Status: Open +Status: Not a bug
 [2012-12-24 11:21 UTC] felipe@php.net
Related to bug #63829
 [2012-12-24 12:19 UTC] saprykin dot dmitry at gmail dot com
Thanks for reply!
Found compile option to solve this
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Jan 27 05:03:33 2022 UTC