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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: saprykin dot dmitry at gmail dot com
New email:
PHP Version: OS:

 

 [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-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 15:01:56 2024 UTC