|  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 Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
44 - 13 = ?
Subscribe to this entry?

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

Reproduce code:
   $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"?>

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

Actual result:
CLI crashes


Add a Patch

Pull Requests

Add a Pull Request


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

And it workds fine on *nix.
 [2005-04-06 20:55 UTC]
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
 	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	

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

 [2005-04-16 13:26 UTC]
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
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 Jun 14 06:01:33 2024 UTC