#26171 [Opn->Fbk]: using /(a)+/ to match a long string makes php crash

From: Date: Wed, 12 Nov 2003 18:05:30 +0000
Subject: #26171 [Opn->Fbk]: using /(a)+/ to match a long string makes php crash
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-50284@lists.php.net to get a copy of this message
 ID:               26171
 Updated by:       iliaa@php.net
 Reported By:      xuefer at 21cn dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         PCRE related
 Operating System: win
 PHP Version:      4.3.4
 New Comment:

Try raising the memory limit to 20-30 megs.


Previous Comments:
------------------------------------------------------------------------

[2003-11-10 21:31:34] 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-10 20:14:19] iliaa@php.net

Do you have memory limit enabled?

------------------------------------------------------------------------

[2003-11-08 13:20:23] 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-08 12:50:57] 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-07 22:53:28] xuefer at 21cn dot com

Description:
------------
if just crash

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



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=26171&edit=1


Thread (8 messages)

« previous php.bugs (#50284) next »