php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1995 XML parser memory leaks
Submitted: 1999-08-07 22:27 UTC Modified: 1999-08-08 07:38 UTC
From: mlemos at acm dot org Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.0 Latest CVS (07/08/1999) OS: Linux RH 5.2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mlemos at acm dot org
New email:
PHP Version: OS:

 

 [1999-08-07 22:27 UTC] mlemos at acm dot org
I tried the following script and it got me the memory leak reports you may
see below:


<?

Function xml_parser_start_element_handler($parser,$name,$attrs)
{
}

Function xml_parser_end_element_handler($parser,$name)
{
}

Function xml_parser_character_data_handler($parser,$data)
{
}

 if(($parser=xml_parser_create()))
 {
  xml_set_element_handler($parser,"xml_parser_start_element_handler","xml_parser_end_element_handler");
  xml_set_character_data_handler($parser,"xml_parser_character_data_handler");
  xml_parse($parser,"<TEST></TEST>",1);
 }
 
?>

Script:  'test_xml.php'
---------------------------------------
xml.c(445) : Block 0x08161FA0 status:
Beginning:      Cached (allocated on xml.c:105, 20 bytes)
      End:      OK
---------------------------------------
Script:  'test_xml.php'
---------------------------------------
xml.c(445) : Block 0x08161FE0 status:
Beginning:      Cached (allocated on xml.c:129, 20 bytes)
      End:      OK
---------------------------------------
Script:  'test_xml.php'
---------------------------------------
xml.c(445) : Block 0x08162050 status:
Beginning:      Cached (allocated on xml.c:706, 20 bytes)
      End:      OK
---------------------------------------
test_xml.php:  Freeing 0x08162298 (40 bytes), allocated in zend_hash.c on line 175<br>
test_xml.php:  Last leak repeated 1 time

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-08-08 07:38 UTC] thies at cvs dot php dot net
fixed in CVS
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 20:00:02 2026 UTC