php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40883 mysql_query() is allocating memory incorrectly
Submitted: 2007-03-21 16:13 UTC Modified: 2007-03-23 08:00 UTC
From: edwin at aucs dot org Assigned: dmitry (profile)
Status: Closed Package: MySQL related
PHP Version: 5.2.1 OS: WinXP
Private report: No CVE-ID: None
 [2007-03-21 16:13 UTC] edwin at aucs dot org
Description:
------------
Memory leak in mysql_query, memory not being able to be freed by mysql_free_result properly

Reproduce code:
---------------
Refer to Listing 4 to 7 of http://www-128.ibm.com/developerworks/opensource/library/os-php-v521/

Expected result:
----------------
No memory leakage

Actual result:
--------------
mysql_query() is allocating memory incorrectly, even with the latest CVS snap

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-03-21 16:26 UTC] tony2001@php.net
The engine caches small memory blocks.
 [2007-03-23 08:00 UTC] dmitry@php.net
The problem was in Zend Memory Manager, that cached small memory blocks and didn't reuse cache on erealloc().

Fixed in CVS HEAD and PHP_5_2.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC