Bug #72791 [NEW]: Memory leak in PDO persistent connection handling

From: Date: Tue, 09 Aug 2016 05:36:21 +0000
Subject: Bug #72791 [NEW]: Memory leak in PDO persistent connection handling
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-203103@lists.php.net to get a copy of this message
From: keyur Operating system: Linux PHP version: 7.0.9 Package: PDO MySQL Bug Type: Bug Bug description:Memory leak in PDO persistent connection handling 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 -- Edit bug report at https://bugs.php.net/bug.php?id=72791&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72791&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72791&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72791&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=72791&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=72791&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=72791&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=72791&r=needscript Try newer version: https://bugs.php.net/fix.php?id=72791&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=72791&r=support Expected behavior: https://bugs.php.net/fix.php?id=72791&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=72791&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=72791&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=72791&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72791&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=72791&r=dst IIS Stability: https://bugs.php.net/fix.php?id=72791&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=72791&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=72791&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=72791&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=72791&r=mysqlcfg

« previous php.bugs (#203103) next »