php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31046 Segmentation fault on simplexml_load_string
Submitted: 2004-12-09 23:34 UTC Modified: 2004-12-09 23:58 UTC
From: rbro at hotmail dot com Assigned:
Status: Not a bug Package: SimpleXML related
PHP Version: 5CVS-2004-12-09 (dev) OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rbro at hotmail dot com
New email:
PHP Version: OS:

 

 [2004-12-09 23:34 UTC] rbro at hotmail dot com
Description:
------------
This is related to bug 31045 which I just reported, but it's a slightly different scenario and result here.  If I compare the result of simplexml_load_string in an 'if' statement, I'm getting a segmentation fault.  The same thing happens on simplexml_load_file.

Reproduce code:
---------------
<?php
if (($doc = simplexml_load_string('<xml></xml>')) == false)
{
	echo 'equals false';
}
else
{
	echo 'does not equal false';
}
?>


Expected result:
----------------
does not equal false

Actual result:
--------------
Segmentation fault

Patches

serialNo (last revision 2014-04-29 13:20 UTC by mavismokou at gmail dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-09 23:51 UTC] fmk@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.


 [2004-12-09 23:58 UTC] rbro at hotmail dot com
Which bug number is that?  I only see one open SimpleXML bug which doesn't describe this problem.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 05:01:29 2024 UTC