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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
26 - 22 = ?
Subscribe to this entry?

 
 [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: Thu Dec 05 10:01:32 2024 UTC