php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32609 simplexml_load_file crashes CLI
Submitted: 2005-04-06 17:24 UTC Modified: 2005-04-16 13:26 UTC
From: mlovett at morpace dot com Assigned: edink (profile)
Status: Closed Package: SimpleXML related
PHP Version: 5.0.4 OS: Windows XP
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mlovett at morpace dot com
New email:
PHP Version: OS:

 

 [2005-04-06 17:24 UTC] mlovett at morpace dot com
Description:
------------
Trying to load a simple xml file. PHP crashes (see the dialog box "Sorry, the CLI needs to close now"

Reproduce code:
---------------
<?php
   $xml = simplexml_load_file("my.xml");
   if ($xml == false) throw new Exception("Problem loading file");
?>


/// here's the input file:

<?xml version="1.0" encoding="iso-8859-1"?>
<universe>
   <planet>mars</planet>
   <planet>jupiter</planet>
</universe>


Expected result:
----------------
I expected the file to load, or FALSE to be returned

Actual result:
--------------
CLI crashes

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-06 18:41 UTC] helly@php.net
Cannot reproduce with HEAD, no 5.0.4 here on windows, anybody?

And it workds fine on *nix.
 [2005-04-06 20:55 UTC] rrichards@php.net
can reproduce this only with release and snaps builds but not my own builds.
Really strange is that if:
if ($xml == false) is changed to if ($xml == FALSE) it works fine - also crashes when using true rather than TRUE in test. comparing to other values also doesnt crash.

Backtrace looks really pooched too when it crashed:

	php5ts.dll!zend_hash_apply_deleter(_hashtable * ht=0x00327990, bucket * p=0x00a3fe10)  Line 587 + 0x8	C
 	php5ts.dll!zend_hash_graceful_reverse_destroy(_hashtable * ht=0x00327990)  Line 641	C
 	php5ts.dll!shutdown_executor(void * * * tsrm_ls=0x00b2d0c0)  Line 208 + 0x17	C
 	ntdll.dll!7c9105c8() 	
 	ntdll.dll!7c910551() 	
 	ntdll.dll!7c91056d() 	
 	ntdll.dll!7c90fb6c() 	
 	ntdll.dll!7c90fb71() 	
 	msvcrt.dll!77c39f8e() 	
 	msvcrt.dll!77c1d726() 	
 	php5ts.dll!zend_deactivate(void * * * tsrm_ls=0x10167235)  Line 819	C
 	php5ts.dll!_xmlIsMainThread()  + 0x1e	
 	php5ts.dll!___xmlGenericError()  + 0x5	
 	php5ts.dll!_xmlSetGenericErrorFunc()  + 0x22	
 	php5ts.dll!zm_deactivate_libxml(int type=1, int module_number=20, void * * * tsrm_ls=0x00323de0)  Line 487	C
 	php5ts.dll!module_registry_cleanup(_zend_module_entry * module=0x00ae79d8, void * * * tsrm_ls=0x00323de0)  Line 1535 + 0x11	C
 	php5ts.dll!zend_hash_apply(_hashtable * ht=0x10349f80, int (void *, void * * *)* apply_func=0x10006550, void * * * tsrm_ls=0x00327a20)  Line 664 + 0x7	C
 	php5ts.dll!zend_deactivate_modules(void * * * tsrm_ls=0x00323de0)  Line 802 + 0x10	C
 	php5ts.dll!php_request_shutdown(void * dummy=0x00000000)  Line 1218	C
 	php.exe!main(int argc=2, char * * argv=0x00322cc0)  Line 1050	C
 	php.exe!_mainCRTStartup()  + 0xe3	
 	kernel32.dll!7c816d4f() 	
 	kernel32.dll!7c8399f3() 

 [2005-04-16 12:50 UTC] sniper@php.net
Edin, the libxml2 version propably..? (ask Rob what he uses :)


 [2005-04-16 13:26 UTC] rrichards@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

was engine memory corruption bug in boolean comparisons.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Oct 11 22:01:45 2024 UTC