From:             
Operating system: Debian-50-lenny-64
PHP version:      5.3.3
Package:          Reproducible crash
Bug Type:         Bug
Bug description:PCRE segfault

Description:
------------
My phpinfo:

http://188.40.74.4/_phpinfo.php



My hardware configuration:

http://www.hetzner.de/en/hosting/produkte_rootserver/eq4/



Test condition:

Run the script below in console (via SSH in my case).



Result:

Segmentation fault



Note: the regular expression may look senseless, because it was shortened
to the minimun length for reproducing the bug.



Bug is reproducible on php 5.2.6, 5.2.9, 5.2.12 and 5.3.2. (Sorry, can't
test on the latest version, waiting for someone to confirm the bug on
5.3.3).

Sorry, can't make a backtrace on a production server, because it is
necessary to recompile the php.



In Windows this script works well.

Test script:
---------------
$str="<script>".str_repeat(".", 7000); //at least 6378 bytes (or more)

$str=preg_replace("/<script>((?!qqqq).)*/", "", $str);

Expected result:
----------------
Not a Segmentation fault :)

Actual result:
--------------
Debian-50-lenny-64-LAMP:/home/httpd# php -f segf.php

Segmentation fault

Debian-50-lenny-64-LAMP:/home/httpd#

-- 
Edit bug report at http://bugs.php.net/bug.php?id=52818&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=52818&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=52818&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=52818&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=52818&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=52818&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=52818&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=52818&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=52818&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=52818&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=52818&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=52818&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=52818&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=52818&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=52818&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=52818&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=52818&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=52818&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=52818&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=52818&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=52818&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=52818&r=mysqlcfg

Reply via email to