From:             
Operating system: FreeBSD 8.3
PHP version:      5.3.10
Package:          Reproducible crash
Bug Type:         Bug
Bug description:XML Parser segfaults on large xml

Description:
------------
Previously we used PHP 5.2.17 in pfSense 2.0 before we upgraded our build
process to the current 5.3.10.

We use the suplied xml to PHP array function in pfSense to convert RRD
files and add new fields to RRD files.

Here is the PHP version that we use on pfSense.
[2.1-DEVELOPMENT][root@pfsense.localdomain]/root(1): php -v
PHP 5.3.10 with Suhosin-Patch (cgi-fcgi) (built: Feb 17 2012 14:05:19)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
    with Suhosin v0.9.27, Copyright (c) 2007, by SektionEins GmbH


$xml = file_get_contents("wan-traffic.rrd.old.xml");
$array = xml2array($xml, 1, "tag");
/* this ^^ causes a segfault */

Please see the complete code below and a test file to work on.

Test script:
---------------
PHP code that triggers our crash, please download the entire code and XML
file from:

http://iserv.nl/files/pfsense/php/wan-traffic.rrd.old.xml
http://iserv.nl/files/pfsense/php/testscript.txt


Expected result:
----------------
Return a array of the XML data.

Actual result:
--------------
PHP core dumps with a signal 11.
http://iserv.nl/files/pfsense/php/php%20core%20dump%205.3.10%20freebsd%208.3.png

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

Reply via email to