php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26171 using /(a)+/ to match a long string makes php crash
Submitted: 2003-11-07 22:53 UTC Modified: 2003-11-17 18:24 UTC
From: xuefer at 21cn dot com Assigned:
Status: Not a bug Package: PCRE related
PHP Version: 4.3.4 OS: winxp
Private report: No CVE-ID: None
 [2003-11-07 22:53 UTC] xuefer at 21cn dot com
Description:
------------
if just crash

Reproduce code:
---------------
<?php
preg_match('/(aa)+/', str_repeat('a', 1000));
?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-11-08 12:50 UTC] iliaa@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

Works fine here with PHP4 & PHP5.
 [2003-11-08 13:20 UTC] xuefer at 21cn dot com
apache2
[Sun Nov 09 02:20:30 2003] [notice] Parent: child process exited with status 128 -- Restarting.
still crashing

but what system did u pass the test?
 [2003-11-10 20:14 UTC] iliaa@php.net
Do you have memory limit enabled?
 [2003-11-10 21:31 UTC] xuefer at 21cn dot com
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 30     ; Maximum execution time of each script, in seconds
max_input_time = 60	; Maximum amount of time each script may spend parsing request data
memory_limit = 8M      ; Maximum amount of memory a script may consume (8MB)
 [2003-11-12 13:05 UTC] iliaa@php.net
Try raising the memory limit to 20-30 megs.
 [2003-11-12 21:08 UTC] xuefer at 21cn dot com
sorry, but no use
still crash without winxp crashing notice
it just shown error in apache log so i get nothing in drwtsn32.exe
 [2003-11-17 18:24 UTC] sniper@php.net
It's a PCRE limitation. Please try searching the bug db before submitting the 100th report about same issue..

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 10:01:28 2024 UTC