php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72791 Memory leak in PDO persistent connection handling
Submitted: 2016-08-09 05:36 UTC Modified: 2016-08-09 18:21 UTC
From: keyur@php.net Assigned: keyur (profile)
Status: Closed Package: PDO MySQL
PHP Version: 7.0.9 OS: Linux
Private report: No CVE-ID: None
 [2016-08-09 05:36 UTC] keyur@php.net
Description:
------------
When the test ext/pdo_mysql/tests/pdo_mysql_pconnect.phpt is run under Valgrind, it reports the following leak:

 12 ==7585== 9,915 (184 direct, 9,731 indirect) bytes in 1 blocks are definitely lost in loss record 56 of 56
 13 ==7585==    at 0x4C29BFD: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
 14 ==7585==    by 0x6D6948: __zend_malloc (zend_alloc.c:2866)
 15 ==7585==    by 0x6D69B0: __zend_calloc (zend_alloc.c:2875)
 16 ==7585==    by 0x582718: zim_PDO_dbh_constructor (pdo_dbh.c:311)
 17 ==7585==    by 0x7714BA: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:842)
 18 ==7585==    by 0x7338AA: execute_ex (zend_vm_execute.h:414)
 19 ==7585==    by 0x77CD66: zend_execute (zend_vm_execute.h:458)
 20 ==7585==    by 0x6F7413: zend_execute_scripts (zend.c:1427)
 21 ==7585==    by 0x69BD3F: php_execute_script (main.c:2494)
 22 ==7585==    by 0x77E8EE: do_cli (php_cli.c:974)
 23 ==7585==    by 0x42F9EE: main (php_cli.c:1344)
 24 ==7585==
 25 ==7585== LEAK SUMMARY:
 26 ==7585==    definitely lost: 184 bytes in 1 blocks
 27 ==7585==    indirectly lost: 9,731 bytes in 34 blocks
 28 ==7585==      possibly lost: 0 bytes in 0 blocks
 29 ==7585==    still reachable: 1,606 bytes in 21 blocks
 30 ==7585==         suppressed: 0 bytes in 0 blocks


Test script:
---------------
See test ext/pdo_mysql/tests/pdo_mysql_pconnect.phpt

Expected result:
----------------
No leaks


Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-08-09 05:36 UTC] keyur@php.net
-Assigned To: +Assigned To: keyur
 [2016-08-09 18:21 UTC] keyur@php.net
-Status: Assigned +Status: Closed
 [2016-08-09 18:21 UTC] keyur@php.net
The fix for this bug has been committed.

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/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 09 02:01:27 2024 UTC