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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: edwin at aucs dot org
New email:
PHP Version: OS:

 

 [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

Add a Patch

Pull Requests

Add a Pull Request

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: Fri Apr 26 15:01:56 2024 UTC