Bug #70288 [Opn]: Apache crash related to simplexml_load_file()
| From: | laruence@php.net | Date: | Tue, 18 Aug 2015 09:43:32 +0000 |
| Subject: | Bug #70288 [Opn]: Apache crash related to simplexml_load_file() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-195270@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70288&edit=1
ID: 70288
Updated by: laruence@php.net
Reported by: bensor987 at neuf dot fr
Summary: Apache crash related to simplexml_load_file()
Status: Open
Type: Bug
Package: SimpleXML related
Operating System: Windows 7 Pro
PHP Version: 7.0Git-2015-08-18 (snap)
-Assigned To:
+Assigned To: laruence
Block user comment: N
Private report: N
New Comment:
okey, this actually is not a simplexml specifical problem, it's in engine.. assign to me
Previous Comments:
------------------------------------------------------------------------
[2015-08-18 08:01:48] bensor987 at neuf dot fr
Description:
------------
I've managed to locate this very tricky bug. It makes my Apache crash. It happens when :
- Using simplexml_load_file()
- Using a function, where the SimpleXML arg is "referenced"
It doesn't happen when I don't reference the arg or if I use simplexml_load_string().
See the test script for example.
I'm testing on snap "php-master-ts-windows-vc14-x86-r531fa70" (can't test on a
more recent snap, Apache crashes on service startup), with Apache/2.4.12 (Win32)
Test script:
---------------
==segfault.xml==
<Menu>
<Node title="">
</Node>
</Menu>
==PHP script==
<?php
$xml = simplexml_load_file('segfault.xml');
function test(&$xml)
{
var_dump($xml);
}
test($xml->Node);
Expected result:
----------------
Dump of the SimpleXML object
Actual result:
--------------
Crash
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70288&edit=1