php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20698 preg_match_all causes php to fail with "unknow software exception"
Submitted: 2002-11-28 06:26 UTC Modified: 2002-11-28 07:11 UTC
Votes:2
Avg. Score:2.5 ± 1.5
Reproduced:1 of 2 (50.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: thingol at mail dot ru Assigned:
Status: Not a bug Package: PCRE related
PHP Version: 4.3.0-dev OS: *
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: thingol at mail dot ru
New email:
PHP Version: OS:

 

 [2002-11-28 06:26 UTC] thingol at mail dot ru
If the text for preg_match_all is bigger than some value, many regexp constructions causes php to terminate.

This code crashes php (on win32 only):

<?
$thi = str_repeat("aaaaaaa   a aa aa aa\n", 1000);
preg_match_all("/(.|\n)*/",$thi,$vars);
?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-28 07:06 UTC] wez@php.net
Not really a PHP bug; bug is in the PCRE library itself
and is because you are asking it to capture a very large
number of individual character matches.
Increasing your stack size might help (ulimit).

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 06:01:30 2024 UTC